Commit 7c287380 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller

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: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8bf2e58f
...@@ -704,9 +704,8 @@ void mlx4_en_stop_port(struct net_device *dev) ...@@ -704,9 +704,8 @@ void mlx4_en_stop_port(struct net_device *dev)
netif_tx_stop_all_queues(dev); netif_tx_stop_all_queues(dev);
netif_tx_unlock_bh(dev); netif_tx_unlock_bh(dev);
/* close port*/ /* Set port as not active */
priv->port_up = false; priv->port_up = false;
mlx4_CLOSE_PORT(mdev->dev, priv->port);
/* Unregister Mac address for the port */ /* Unregister Mac address for the port */
mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index); mlx4_unregister_mac(mdev->dev, priv->port, priv->mac_index);
...@@ -731,6 +730,9 @@ void mlx4_en_stop_port(struct net_device *dev) ...@@ -731,6 +730,9 @@ void mlx4_en_stop_port(struct net_device *dev)
msleep(1); msleep(1);
mlx4_en_deactivate_cq(priv, &priv->rx_cq[i]); 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) static void mlx4_en_restart(struct work_struct *work)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment