diff options
author | Michael Chan <mchan@broadcom.com> | 2008-12-17 22:06:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-17 22:06:08 -0500 |
commit | 3298a7388c00227e736d1037328788073c80c7b4 (patch) | |
tree | 1373c89c430acbd09b30e602750aa43c1c9e833c /drivers | |
parent | 69c30e1e7492192f882a3fc11888b320fde5206a (diff) |
bnx2: Fix bug in bnx2_free_rx_mem().
DMA memory for the jumbo rx page rings was freed incorrectly using the
wrong local variable as the array index.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/bnx2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index a1a3d0e5d2b4..9e8222f9e90e 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp) | |||
543 | for (j = 0; j < bp->rx_max_pg_ring; j++) { | 543 | for (j = 0; j < bp->rx_max_pg_ring; j++) { |
544 | if (rxr->rx_pg_desc_ring[j]) | 544 | if (rxr->rx_pg_desc_ring[j]) |
545 | pci_free_consistent(bp->pdev, RXBD_RING_SIZE, | 545 | pci_free_consistent(bp->pdev, RXBD_RING_SIZE, |
546 | rxr->rx_pg_desc_ring[i], | 546 | rxr->rx_pg_desc_ring[j], |
547 | rxr->rx_pg_desc_mapping[i]); | 547 | rxr->rx_pg_desc_mapping[j]); |
548 | rxr->rx_pg_desc_ring[i] = NULL; | 548 | rxr->rx_pg_desc_ring[j] = NULL; |
549 | } | 549 | } |
550 | if (rxr->rx_pg_ring) | 550 | if (rxr->rx_pg_ring) |
551 | vfree(rxr->rx_pg_ring); | 551 | vfree(rxr->rx_pg_ring); |