net/mlx4_en: Call napi_synchronize on stop_port
authorIdo Shamay <idos@mellanox.com>
Mon, 27 Oct 2014 09:37:45 +0000 (11:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Oct 2014 21:18:01 +0000 (17:18 -0400)
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>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c

index a23aa30..0e77cb2 100644 (file)
@@ -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);