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 a23aa309e2f0a4c52e99d78ee80b415eaa473504..0e77cb27d7d7a6e41ee4c1a76591fbc184121c42 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);