[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061213212505.GN1915@austin.ibm.com>
Date: Wed, 13 Dec 2006 15:25:05 -0600
From: linas@...tin.ibm.com (Linas Vepstas)
To: Andrew Morton <akpm@...l.org>
Cc: netdev@...r.kernel.org, linuxppc-dev@...abs.org, jgarzik@...ox.com,
Christoph Hellwig <hch@...radead.org>,
Ishizaki Kou <kou.ishizaki@...hiba.co.jp>,
Jens Osterkamp <Jens.Osterkamp@....de>,
James K Lewis <jim@...ewis.com>,
Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 14/14] Spidernet Rework RX linked list
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@...tin.ibm.com>
Cc: James K Lewis <jklewis@...ibm.com>
Cc: Arnd Bergmann <arnd@...db.de>
----
drivers/net/spider_net.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 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-13 14:32:13.000000000 -0600
+++ linux-2.6.19-git7/drivers/net/spider_net.c 2006-12-13 14:33:21.000000000 -0600
@@ -419,9 +419,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;
@@ -1650,7 +1654,6 @@ int
spider_net_open(struct net_device *netdev)
{
struct spider_net_card *card = netdev_priv(netdev);
- struct spider_net_descr *descr;
int result;
result = spider_net_init_chain(card, &card->tx_chain);
@@ -1662,13 +1665,6 @@ spider_net_open(struct net_device *netde
if (result)
goto alloc_rx_failed;
- /* Make a ring of of bus addresses */
- descr = card->rx_chain.ring;
- do {
- descr->next_descr_addr = descr->next->bus_addr;
- descr = descr->next;
- } while (descr != card->rx_chain.ring);
-
/* Allocate rx skbs */
if (spider_net_alloc_rx_skbs(card))
goto alloc_skbs_failed;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists