diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2010-08-23 23:45:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 17:54:48 -0400 |
commit | 7c2873809dd1a2d5e46be3f0ff2071fcdc3cf0fd (patch) | |
tree | 73a37e2eca1aa32938cf16eea20bc009126fa2ba /drivers/net/mlx4/en_netdev.c | |
parent | 8bf2e58f8b7a14244bf182ad0a3ba0457ad70c62 (diff) |
mlx4_en: performing CLOSE_PORT at the end of tear-down process
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>
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.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 4d6dac7617f7..985e6f83b31a 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) | |||
704 | netif_tx_stop_all_queues(dev); | 704 | netif_tx_stop_all_queues(dev); |
705 | netif_tx_unlock_bh(dev); | 705 | netif_tx_unlock_bh(dev); |
706 | 706 | ||
707 | /* close port*/ | 707 | /* Set port as not active */ |
708 | priv->port_up = false; | 708 | priv->port_up = false; |
709 | mlx4_CLOSE_PORT(mdev->dev, priv->port); | ||
710 | 709 | ||
711 | /* Unregister Mac address for the port */ | 710 | /* Unregister Mac address for the port */ |
712 | mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index); | 711 | mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index); |
@@ -731,6 +730,9 @@ void mlx4_en_stop_port(struct net_device *dev) | |||
731 | msleep(1); | 730 | msleep(1); |
732 | mlx4_en_deactivate_cq(priv, &priv->rx_cq[i]); | 731 | mlx4_en_deactivate_cq(priv, &priv->rx_cq[i]); |
733 | } | 732 | } |
733 | |||
734 | /* close port*/ | ||
735 | mlx4_CLOSE_PORT(mdev->dev, priv->port); | ||
734 | } | 736 | } |
735 | 737 | ||
736 | static void mlx4_en_restart(struct work_struct *work) | 738 | static void mlx4_en_restart(struct work_struct *work) |