[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248632456-24417-1-git-send-email-dhananjay@netxen.com>
Date: Sun, 26 Jul 2009 11:20:56 -0700
From: Dhananjay Phadke <dhananjay@...xen.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org
Subject: [PATCH] netxen: reset ring consumer during cleanup
Reset consumer of status rings to 0 when cleaning
up sw resources. Status rings are not deleted
during suspend since they have napi objects.
This ensures correct rx processing across suspen-resume.
Signed-off-by: Dhananjay Phadke <dhananjay@...xen.com>
---
drivers/net/netxen/netxen_nic_init.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index 5d3343e..7acf204 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -184,6 +184,13 @@ void netxen_free_sw_resources(struct netxen_adapter *adapter)
kfree(recv_ctx->rds_rings);
skip_rds:
+ if (recv_ctx->sds_rings == NULL)
+ goto skip_sds;
+
+ for(ring = 0; ring < adapter->max_sds_rings; ring++)
+ recv_ctx->sds_rings[ring].consumer = 0;
+
+skip_sds:
if (adapter->tx_ring == NULL)
return;
--
1.6.0.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists