Skip to content

Commit

Permalink
mlx4_en: performing CLOSE_PORT at the end of tear-down process
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yevgeny Petrilin authored and David S. Miller committed Aug 24, 2010
1 parent 8bf2e58 commit 7c28738
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/mlx4/en_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand Down

0 comments on commit 7c28738

Please sign in to comment.