Netdev List
 help / color / mirror / Atom feed
* [PATCH 04/14] mlx4_en: performing CLOSE_PORT at the end of tear-down process
@ 2010-08-24 13:45 Yevgeny Petrilin
  0 siblings, 0 replies; only message in thread
From: Yevgeny Petrilin @ 2010-08-24 13:45 UTC (permalink / raw)
  To: davem; +Cc: netdev, yevgenyp, eugenia

All port's resources should be closed before we give the
CLOSE_PORT command to the firmware.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
 drivers/net/mlx4/en_netdev.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index c4ab0fc..068e572 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -704,9 +704,8 @@ void mlx4_en_stop_port(struct net_device *dev)
 	netif_tx_stop_all_queues(dev);
 	netif_tx_unlock_bh(dev);
 
-	/* close port*/
+	/* Set port as not active */
 	priv->port_up = false;
-	mlx4_CLOSE_PORT(mdev->dev, priv->port);
 
 	/* Unregister Mac address for the port */
 	mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index);
@@ -731,6 +730,9 @@ void mlx4_en_stop_port(struct net_device *dev)
 			msleep(1);
 		mlx4_en_deactivate_cq(priv, &priv->rx_cq[i]);
 	}
+
+	/* close port*/
+	mlx4_CLOSE_PORT(mdev->dev, priv->port);
 }
 
 static void mlx4_en_restart(struct work_struct *work)
-- 
1.6.1.3



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-24 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 13:45 [PATCH 04/14] mlx4_en: performing CLOSE_PORT at the end of tear-down process Yevgeny Petrilin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox