aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/spider_net.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index d73018b5cfc8..bf6ff39e02bb 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -419,9 +419,13 @@ spider_net_prepare_rx_descr(struct spider_net_card *card,
419 card->spider_stats.rx_iommu_map_error++; 419 card->spider_stats.rx_iommu_map_error++;
420 descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; 420 descr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
421 } else { 421 } else {
422 descr->next_descr_addr = 0;
422 wmb(); 423 wmb();
423 descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | 424 descr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED |
424 SPIDER_NET_DMAC_NOINTR_COMPLETE; 425 SPIDER_NET_DMAC_NOINTR_COMPLETE;
426
427 wmb();
428 descr->prev->next_descr_addr = descr->bus_addr;
425 } 429 }
426 430
427 return 0; 431 return 0;
@@ -1650,7 +1654,6 @@ int
1650spider_net_open(struct net_device *netdev) 1654spider_net_open(struct net_device *netdev)
1651{ 1655{
1652 struct spider_net_card *card = netdev_priv(netdev); 1656 struct spider_net_card *card = netdev_priv(netdev);
1653 struct spider_net_descr *descr;
1654 int result; 1657 int result;
1655 1658
1656 result = spider_net_init_chain(card, &card->tx_chain); 1659 result = spider_net_init_chain(card, &card->tx_chain);
@@ -1662,13 +1665,6 @@ spider_net_open(struct net_device *netdev)
1662 if (result) 1665 if (result)
1663 goto alloc_rx_failed; 1666 goto alloc_rx_failed;
1664 1667
1665 /* Make a ring of of bus addresses */
1666 descr = card->rx_chain.ring;
1667 do {
1668 descr->next_descr_addr = descr->next->bus_addr;
1669 descr = descr->next;
1670 } while (descr != card->rx_chain.ring);
1671
1672 /* Allocate rx skbs */ 1668 /* Allocate rx skbs */
1673 if (spider_net_alloc_rx_skbs(card)) 1669 if (spider_net_alloc_rx_skbs(card))
1674 goto alloc_skbs_failed; 1670 goto alloc_skbs_failed;