summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_netdev.c
diff options
context:
space:
mode:
authorYevgeny Petrilin <yevgenyp@mellanox.co.il>2009-06-20 22:15:52 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-21 19:18:05 -0700
commit3c05f5ef7c09291e51ae327e854bf43cb8e55a55 (patch)
tree0751a4e0e7834f0d3cffbaf8d9cda7ff731db18f /drivers/net/mlx4/en_netdev.c
parenta11faac79fdbf771ed1ab310f6ef44b389423fe7 (diff)
mlx4_en: Cancel port_up check in transmit function
When closing the port, we stop all transmit queues under the transmit lock. It ensures that we will not attempt to transmit new packets after the physical port was closed. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r--drivers/net/mlx4/en_netdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 20a34cb6392..03a557cc3b7 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -700,14 +700,14 @@ void mlx4_en_stop_port(struct net_device *dev)
en_dbg(DRV, priv, "stop port called while port already down\n");
return;
}
- netif_tx_stop_all_queues(dev);
/* Synchronize with tx routine */
netif_tx_lock_bh(dev);
- priv->port_up = false;
+ netif_tx_stop_all_queues(dev);
netif_tx_unlock_bh(dev);
/* close port*/
+ priv->port_up = false;
mlx4_CLOSE_PORT(mdev->dev, priv->port);
/* Unregister Mac address for the port */