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

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: 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 avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent b7e36bfa
...@@ -419,9 +419,13 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, ...@@ -419,9 +419,13 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
card->spider_stats.rx_iommu_map_error++; card->spider_stats.rx_iommu_map_error++;
descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
} else { } else {
descr->next_descr_addr = 0;
wmb(); wmb();
descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED |
SPIDER_NET_DMAC_NOINTR_COMPLETE; SPIDER_NET_DMAC_NOINTR_COMPLETE;
wmb();
descr->prev->next_descr_addr = descr->bus_addr;
} }
return 0; return 0;
...@@ -1650,7 +1654,6 @@ int ...@@ -1650,7 +1654,6 @@ int
spider_net_open(struct net_device *netdev) spider_net_open(struct net_device *netdev)
{ {
struct spider_net_card *card = netdev_priv(netdev); struct spider_net_card *card = netdev_priv(netdev);
struct spider_net_descr *descr;
int result; int result;
result = spider_net_init_chain(card, &card->tx_chain); result = spider_net_init_chain(card, &card->tx_chain);
...@@ -1662,13 +1665,6 @@ spider_net_open(struct net_device *netdev) ...@@ -1662,13 +1665,6 @@ spider_net_open(struct net_device *netdev)
if (result) if (result)
goto alloc_rx_failed; 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 */ /* Allocate rx skbs */
if (spider_net_alloc_rx_skbs(card)) if (spider_net_alloc_rx_skbs(card))
goto alloc_skbs_failed; goto alloc_skbs_failed;
......
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