Skip to content

Commit

Permalink
netxen: reset ring consumer during cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dhananjay Phadke authored and David S. Miller committed Jul 27, 2009
1 parent c587aea commit c8a5a65
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit c8a5a65

Please sign in to comment.