netxen: reset ring consumer during cleanup
authorDhananjay Phadke <dhananjay@netxen.com>
Mon, 27 Jul 2009 03:17:21 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2009 03:17:21 +0000 (20:17 -0700)
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@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netxen/netxen_nic_init.c

index 5d3343ef3d86312713481186b541656b1eba3470..7acf204e38c9261b0168b4828a85f61bbc87eb47 100644 (file)
@@ -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;