diff options
author | Alexander Guller <alexg@mellanox.com> | 2011-10-09 01:26:46 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-09 23:42:57 -0400 |
commit | fe0af03c69abc2178fc4667664726ec1f688539b (patch) | |
tree | 82f809da0de1e1d67b8ef8a865ec32218f4757dd /drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |
parent | 76532d0c7e7424914ab6f24683c63e50f0a08f1c (diff) |
mlx4_en: Removing reserve vectors
Fixed a bug where ring size change caused insufficient memory
upon driver restart due to unreleased EQs.
Signed-off-by: Alexander Guller <alexg@mellanox.co.il>
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_netdev.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c index b42c6aa70742..840298206532 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c | |||
@@ -876,7 +876,7 @@ static int mlx4_en_close(struct net_device *dev) | |||
876 | return 0; | 876 | return 0; |
877 | } | 877 | } |
878 | 878 | ||
879 | void mlx4_en_free_resources(struct mlx4_en_priv *priv, bool reserve_vectors) | 879 | void mlx4_en_free_resources(struct mlx4_en_priv *priv) |
880 | { | 880 | { |
881 | int i; | 881 | int i; |
882 | 882 | ||
@@ -884,14 +884,14 @@ void mlx4_en_free_resources(struct mlx4_en_priv *priv, bool reserve_vectors) | |||
884 | if (priv->tx_ring[i].tx_info) | 884 | if (priv->tx_ring[i].tx_info) |
885 | mlx4_en_destroy_tx_ring(priv, &priv->tx_ring[i]); | 885 | mlx4_en_destroy_tx_ring(priv, &priv->tx_ring[i]); |
886 | if (priv->tx_cq[i].buf) | 886 | if (priv->tx_cq[i].buf) |
887 | mlx4_en_destroy_cq(priv, &priv->tx_cq[i], reserve_vectors); | 887 | mlx4_en_destroy_cq(priv, &priv->tx_cq[i]); |
888 | } | 888 | } |
889 | 889 | ||
890 | for (i = 0; i < priv->rx_ring_num; i++) { | 890 | for (i = 0; i < priv->rx_ring_num; i++) { |
891 | if (priv->rx_ring[i].rx_info) | 891 | if (priv->rx_ring[i].rx_info) |
892 | mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i]); | 892 | mlx4_en_destroy_rx_ring(priv, &priv->rx_ring[i]); |
893 | if (priv->rx_cq[i].buf) | 893 | if (priv->rx_cq[i].buf) |
894 | mlx4_en_destroy_cq(priv, &priv->rx_cq[i], reserve_vectors); | 894 | mlx4_en_destroy_cq(priv, &priv->rx_cq[i]); |
895 | } | 895 | } |
896 | } | 896 | } |
897 | 897 | ||
@@ -961,7 +961,7 @@ void mlx4_en_destroy_netdev(struct net_device *dev) | |||
961 | mdev->pndev[priv->port] = NULL; | 961 | mdev->pndev[priv->port] = NULL; |
962 | mutex_unlock(&mdev->state_lock); | 962 | mutex_unlock(&mdev->state_lock); |
963 | 963 | ||
964 | mlx4_en_free_resources(priv, false); | 964 | mlx4_en_free_resources(priv); |
965 | free_netdev(dev); | 965 | free_netdev(dev); |
966 | } | 966 | } |
967 | 967 | ||