netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] mlx4_en: Fix error handling while activating RX rings
@ 2009-04-20 14:24 Yevgeny Petrilin
  2009-04-20 14:26 ` [PATCH 2/5]mlx4_en: Fix a race at restart task Yevgeny Petrilin
                   ` (5 more replies)
  0 siblings, 6 replies; 39+ messages in thread
From: Yevgeny Petrilin @ 2009-04-20 14:24 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, tziporet

In case of failure of either srq creation or page allocation,
the cleanup code handled the failed ring as well, and tried
to destroy resources that where not allocated.

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

diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index 7e40741..8673008 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -436,8 +436,9 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
 		/* Initialize page allocators */
 		err = mlx4_en_init_allocator(priv, ring);
 		if (err) {
-			 mlx4_err(mdev, "Failed initializing ring allocator\n");
-			 goto err_allocator;
+			mlx4_err(mdev, "Failed initializing ring allocator\n");
+			ring_ind--;
+			goto err_allocator;
 		}

 		/* Fill Rx buffers */
@@ -467,6 +468,7 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
 				     ring->wqres.db.dma, &ring->srq);
 		if (err){
 			mlx4_err(mdev, "Failed to allocate srq\n");
+			ring_ind--;
 			goto err_srq;
 		}
 		ring->srq.event = mlx4_en_srq_event;
-- 
1.5.4


^ permalink raw reply related	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2009-06-02  9:36 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-20 14:24 [PATCH 1/5] mlx4_en: Fix error handling while activating RX rings Yevgeny Petrilin
2009-04-20 14:26 ` [PATCH 2/5]mlx4_en: Fix a race at restart task Yevgeny Petrilin
2009-04-21  4:32   ` [PATCH] mlx4_en: Fix cleanup if workqueue create in mlx4_en_add() fails Roland Dreier
2009-04-21  8:50     ` David Miller
2009-04-21  8:49   ` [PATCH 2/5]mlx4_en: Fix a race at restart task David Miller
2009-04-20 14:30 ` [PATCH 3/5] mlx4_en: Assign dummy event handler for TX queue Yevgeny Petrilin
2009-04-21  8:50   ` David Miller
2009-04-20 14:33 ` [PATCH 4/5] mlx4_en: use NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM for tx csum at initialization Yevgeny Petrilin
2009-04-20 14:34   ` [PATCH 5/5] mlx4_en: Move to SW counters for total bytes and packets Yevgeny Petrilin
2009-04-21  8:50     ` David Miller
2009-04-21  8:50   ` [PATCH 4/5] mlx4_en: use NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM for tx csum at initialization David Miller
2009-04-27  6:42   ` [PATCH 2/2] mlx4_en: Handle page allocation failure during receive Yevgeny Petrilin
2009-04-27  9:31     ` David Miller
2009-04-21  8:49 ` [PATCH 1/5] mlx4_en: Fix error handling while activating RX rings David Miller
2009-04-27  6:41 ` [PATCH 1/2] mlx4_en: Fix cleanup flow on cq activation Yevgeny Petrilin
2009-04-27  9:31   ` David Miller
2009-05-13 11:47 ` [PATCH] mlx4_en: Fix not deleted napi structures Yevgeny Petrilin
2009-05-18  3:49   ` David Miller
2009-05-24 13:16   ` [PATCH 1/2] mlx4_en: Removed redundant stride variable Yevgeny Petrilin
2009-05-25  7:36     ` David Miller
2009-05-24 13:17   ` [PATCH 2/2] mlx4_en: Fix partial rings feature Yevgeny Petrilin
2009-05-25  7:36     ` David Miller
2009-05-25  8:32     ` [net-2.6 PATCH] mlx4_en: Fix a kernel panic when waking tx queue Yevgeny Petrilin
2009-05-25  8:44       ` David Miller
2009-05-26  6:49         ` Yevgeny Petrilin
2009-06-02  9:20         ` [PATCH 2/8] mlx4_en: Moved all module parameters handling to en_main.c Yevgeny Petrilin
2009-06-02  9:21         ` [PATCH 3/8] mlx4_en renamed en_params.c to en_ethtool.c Yevgeny Petrilin
2009-06-02  9:22         ` [PATCH 4/8] mlx4_en: Work with part of the ports Yevgeny Petrilin
2009-06-02  9:23         ` [PATCH 5/8] mlx4_en: Coalescing target is equal for all mtu's Yevgeny Petrilin
2009-06-02  9:24         ` [PATCH 6/8] mlx4_en: multiqueue support Yevgeny Petrilin
2009-06-02  9:28         ` [PATCH 7/8] mlx4_en: Added vlan_features support Yevgeny Petrilin
2009-06-02  9:29         ` [PATCH 8/8] mlx4_en: Updated driver version Yevgeny Petrilin
2009-06-02  9:36           ` David Miller
2009-05-26  6:57       ` [net-2.6 PATCH V2] mlx4_en: Fix a kernel panic when waking tx queue Yevgeny Petrilin
2009-05-26 10:48         ` Eric Dumazet
2009-05-27  6:08           ` Yevgeny Petrilin
2009-05-30  5:00         ` David Miller
2009-06-02  6:27         ` [PATCH 1/8] mlx4_en: Giving interface name in debug messages Yevgeny Petrilin
2009-06-02  7:36           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).