Browse Source

net/mlx4_en: Call napi_synchronize on stop_port

This is instead of calling the actual implementation of
napi_synchronize, for better encapsulation.

Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ido Shamay 11 years ago
parent
commit
f4a3675158
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/net/ethernet/mellanox/mlx4/en_netdev.c

+ 1 - 2
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

@@ -1843,8 +1843,7 @@ void mlx4_en_stop_port(struct net_device *dev, int detach)
 		}
 		local_bh_enable();
 
-		while (test_bit(NAPI_STATE_SCHED, &cq->napi.state))
-			msleep(1);
+		napi_synchronize(&cq->napi);
 		mlx4_en_deactivate_rx_ring(priv, priv->rx_ring[i]);
 		mlx4_en_deactivate_cq(priv, cq);