[PATCH 16/16] Spidernet Rework RX linked list
Linas Vepstas
linas at austin.ibm.com
Thu Dec 7 10:51:02 EST 2006
Make the hardware perceive the RX descriptor ring as a
null-terminated linked list, instead of a circular ring.
Signed-off-by: Linas Vepstas <linas at austin.ibm.com>
Cc: James K Lewis <jklewis at us.ibm.com>
Cc: Arnd Bergmann <arnd at arndb.de>
----
drivers/net/spider_net.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
Index: linux-2.6.19-git7/drivers/net/spider_net.c
===================================================================
--- linux-2.6.19-git7.orig/drivers/net/spider_net.c 2006-12-06 16:03:20.000000000 -0600
+++ linux-2.6.19-git7/drivers/net/spider_net.c 2006-12-06 16:05:48.000000000 -0600
@@ -389,9 +389,13 @@ spider_net_prepare_rx_descr(struct spide
card->spider_stats.rx_iommu_map_error++;
descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
} else {
+ descr->next_descr_addr = 0;
wmb();
descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED |
SPIDER_NET_DMAC_NOINTR_COMPLETE;
+
+ wmb();
+ descr->prev->next_descr_addr = descr->bus_addr;
}
return 0;
@@ -1676,12 +1680,6 @@ spider_net_open(struct net_device *netde
+ card->num_tx_desc * sizeof(struct spider_net_descr),
card->num_rx_desc);
- descr = card->rx_chain.head;
- do {
- descr->next_descr_addr = descr->next->bus_addr;
- descr = descr->next;
- } while (descr != card->rx_chain.head);
-
/* allocate rx skbs */
if (spider_net_alloc_rx_skbs(card))
goto alloc_skbs_failed;
More information about the Linuxppc-dev
mailing list