diff options
author | Achiad Shochat <achiad@mellanox.com> | 2015-08-04 14:05:45 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-07 08:00:58 +0300 |
commit | 1cefa326ff26dddb2c4a7f43802ce0ba5c35a2ba (patch) | |
tree | f647618ea1ffd0d6a1eddf2028ef5e89df2b63e7 /drivers | |
parent | 40ab6a6ebeebbcfc313233f5aa0d55930734f529 (diff) | |
download | linux-1cefa326ff26dddb2c4a7f43802ce0ba5c35a2ba.tar.xz |
net/mlx5e: Disable async events before unregister_netdev()
It does not make sense to allow events while the netdev is
unregistered.
Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 33a0488dc144..436968806268 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -2138,6 +2138,8 @@ static void mlx5e_destroy_netdev(struct mlx5_core_dev *mdev, void *vpriv) struct mlx5e_priv *priv = vpriv; struct net_device *netdev = priv->netdev; + mlx5e_disable_async_events(priv); + flush_scheduled_work(); unregister_netdev(netdev); mlx5e_destroy_flow_tables(priv); mlx5e_destroy_tirs(priv); @@ -2149,8 +2151,6 @@ static void mlx5e_destroy_netdev(struct mlx5_core_dev *mdev, void *vpriv) mlx5_dealloc_transport_domain(priv->mdev, priv->tdn); mlx5_core_dealloc_pd(priv->mdev, priv->pdn); mlx5_unmap_free_uar(priv->mdev, &priv->cq_uar); - mlx5e_disable_async_events(priv); - flush_scheduled_work(); free_netdev(netdev); } |