Commit 64751910 authored by Linas Vepstas's avatar Linas Vepstas Committed by Jeff Garzik

[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: default avatarLinas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 348bc2a6
...@@ -358,7 +358,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) ...@@ -358,7 +358,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card)
struct spider_net_descr *descr; struct spider_net_descr *descr;
descr = card->rx_chain.head; descr = card->rx_chain.head;
while (descr->next != card->rx_chain.head) { do {
if (descr->skb) { if (descr->skb) {
dev_kfree_skb(descr->skb); dev_kfree_skb(descr->skb);
pci_unmap_single(card->pdev, descr->buf_addr, pci_unmap_single(card->pdev, descr->buf_addr,
...@@ -366,7 +366,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card) ...@@ -366,7 +366,7 @@ spider_net_free_rx_chain_contents(struct spider_net_card *card)
PCI_DMA_BIDIRECTIONAL); PCI_DMA_BIDIRECTIONAL);
} }
descr = descr->next; descr = descr->next;
} } while (descr != card->rx_chain.head);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment