diff options
Diffstat (limited to 'drivers/net/spider_net.c')
-rw-r--r-- | drivers/net/spider_net.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c index c99980a14203..f5ede5f6073c 100644 --- a/drivers/net/spider_net.c +++ b/drivers/net/spider_net.c | |||
@@ -460,13 +460,9 @@ spider_net_prepare_rx_descr(struct spider_net_card *card, | |||
460 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; | 460 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE; |
461 | } else { | 461 | } else { |
462 | hwdescr->buf_addr = buf; | 462 | hwdescr->buf_addr = buf; |
463 | hwdescr->next_descr_addr = 0; | ||
464 | wmb(); | 463 | wmb(); |
465 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | | 464 | hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED | |
466 | SPIDER_NET_DMAC_NOINTR_COMPLETE; | 465 | SPIDER_NET_DMAC_NOINTR_COMPLETE; |
467 | |||
468 | wmb(); | ||
469 | descr->prev->hwdescr->next_descr_addr = descr->bus_addr; | ||
470 | } | 466 | } |
471 | 467 | ||
472 | return 0; | 468 | return 0; |
@@ -541,12 +537,16 @@ spider_net_refill_rx_chain(struct spider_net_card *card) | |||
541 | static int | 537 | static int |
542 | spider_net_alloc_rx_skbs(struct spider_net_card *card) | 538 | spider_net_alloc_rx_skbs(struct spider_net_card *card) |
543 | { | 539 | { |
544 | int result; | 540 | struct spider_net_descr_chain *chain = &card->rx_chain; |
545 | struct spider_net_descr_chain *chain; | 541 | struct spider_net_descr *start = chain->tail; |
542 | struct spider_net_descr *descr = start; | ||
546 | 543 | ||
547 | result = -ENOMEM; | 544 | /* Link up the hardware chain pointers */ |
545 | do { | ||
546 | descr->prev->hwdescr->next_descr_addr = descr->bus_addr; | ||
547 | descr = descr->next; | ||
548 | } while (descr != start); | ||
548 | 549 | ||
549 | chain = &card->rx_chain; | ||
550 | /* Put at least one buffer into the chain. if this fails, | 550 | /* Put at least one buffer into the chain. if this fails, |
551 | * we've got a problem. If not, spider_net_refill_rx_chain | 551 | * we've got a problem. If not, spider_net_refill_rx_chain |
552 | * will do the rest at the end of this function. */ | 552 | * will do the rest at the end of this function. */ |
@@ -563,7 +563,7 @@ spider_net_alloc_rx_skbs(struct spider_net_card *card) | |||
563 | 563 | ||
564 | error: | 564 | error: |
565 | spider_net_free_rx_chain_contents(card); | 565 | spider_net_free_rx_chain_contents(card); |
566 | return result; | 566 | return -ENOMEM; |
567 | } | 567 | } |
568 | 568 | ||
569 | /** | 569 | /** |