Skip to content

Commit 37f304d

Browse files
Saeed Mahameeddavem330
authored andcommitted
net/mlx5e: Disable netdev after close
Disable netdev should come after it was closed, although no harm of doing it before -hence the MLX5E_STATE_DESTROYING bit- but it is more natural this way. Fixes: 26e59d8 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks") Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Mohamad Haj Yahia <mohamad@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 610e89e commit 37f304d

File tree

1 file changed

+4
-4
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-4
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,17 +3947,17 @@ void mlx5e_detach_netdev(struct mlx5_core_dev *mdev, struct net_device *netdev)
39473947
const struct mlx5e_profile *profile = priv->profile;
39483948

39493949
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
3950-
if (profile->disable)
3951-
profile->disable(priv);
3952-
3953-
flush_workqueue(priv->wq);
39543950

39553951
rtnl_lock();
39563952
if (netif_running(netdev))
39573953
mlx5e_close(netdev);
39583954
netif_device_detach(netdev);
39593955
rtnl_unlock();
39603956

3957+
if (profile->disable)
3958+
profile->disable(priv);
3959+
flush_workqueue(priv->wq);
3960+
39613961
mlx5e_destroy_q_counter(priv);
39623962
profile->cleanup_rx(priv);
39633963
mlx5e_close_drop_rq(priv);

0 commit comments

Comments
 (0)