mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
net/mlx5e: Disable netdev after close
[ Upstream commit37f304d100] 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:26e59d8077("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee9f2fd3f6
commit
8cb7d6277f
@@ -3942,10 +3942,6 @@ void mlx5e_detach_netdev(struct mlx5_core_dev *mdev, struct net_device *netdev)
|
||||
const struct mlx5e_profile *profile = priv->profile;
|
||||
|
||||
set_bit(MLX5E_STATE_DESTROYING, &priv->state);
|
||||
if (profile->disable)
|
||||
profile->disable(priv);
|
||||
|
||||
flush_workqueue(priv->wq);
|
||||
|
||||
rtnl_lock();
|
||||
if (netif_running(netdev))
|
||||
@@ -3953,6 +3949,10 @@ void mlx5e_detach_netdev(struct mlx5_core_dev *mdev, struct net_device *netdev)
|
||||
netif_device_detach(netdev);
|
||||
rtnl_unlock();
|
||||
|
||||
if (profile->disable)
|
||||
profile->disable(priv);
|
||||
flush_workqueue(priv->wq);
|
||||
|
||||
mlx5e_destroy_q_counter(priv);
|
||||
profile->cleanup_rx(priv);
|
||||
mlx5e_close_drop_rq(priv);
|
||||
|
||||
Reference in New Issue
Block a user