diff options
author | Linas Vepstas <linas@austin.ibm.com> | 2006-10-10 17:22:29 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-10-11 04:04:27 -0400 |
commit | 647519100105fb4ddfe6455e820093999c08c4be (patch) | |
tree | 77904601b90229dd0cae65d01e4c2338fa1ac049 /drivers/net/spider_net.c | |
parent | 348bc2a6e306dc3e875cee3389e1405963ace617 (diff) |
[PATCH] powerpc/cell spidernet release all descrs
Bugfix: rx descriptor release function fails to visit
the last entry while walking receive descriptor ring.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index a26dd1c63189..418138dd6c68 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -358,7 +358,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) | |||
358 | struct spider_net_descr *descr; | 358 | struct spider_net_descr *descr; |
359 | 359 | ||
360 | descr = card->rx_chain.head; | 360 | descr = card->rx_chain.head; |
361 | while (descr->next != card->rx_chain.head) { | 361 | do { |
362 | if (descr->skb) { | 362 | if (descr->skb) { |
363 | dev_kfree_skb(descr->skb); | 363 | dev_kfree_skb(descr->skb); |
364 | pci_unmap_single(card->pdev, descr->buf_addr, | 364 | pci_unmap_single(card->pdev, descr->buf_addr, |
@@ -366,7 +366,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) | |||
366 | PCI_DMA_BIDIRECTIONAL); | 366 | PCI_DMA_BIDIRECTIONAL); |
367 | } | 367 | } |
368 | descr = descr->next; | 368 | descr = descr->next; |
369 | } | 369 | } while (descr != card->rx_chain.head); |
370 | } | 370 | } |
371 | 371 | ||
372 | /** | 372 | /** |