Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2bf27a0d4913a5f0ef38e3be510b1b3add2869ad
Commit:     2bf27a0d4913a5f0ef38e3be510b1b3add2869ad
Parent:     4c4bd5a97a87670d2c368ed4ed8a8f2c93080605
Author:     Linas Vepstas <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 11 13:23:42 2007 -0500
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed Jun 20 19:09:33 2007 -0400

    spidernet: Don't terminate the RX ring
    
    The terminated RX ring will cause trouble during the RX ram full
    conditions, leading to a hung driver, as the hardware can't find
    the next descr.  There is no real reason to terminate the RX ring;
    it doesn't make the operation any smooother, and it does
    require an extra sync. So don't do it.
    
    Signed-off-by: Linas Vepstas <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 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 c99980a..f5ede5f 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,
                hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_NOT_IN_USE;
        } else {
                hwdescr->buf_addr = buf;
-               hwdescr->next_descr_addr = 0;
                wmb();
                hwdescr->dmac_cmd_status = SPIDER_NET_DESCR_CARDOWNED |
                                         SPIDER_NET_DMAC_NOINTR_COMPLETE;
-
-               wmb();
-               descr->prev->hwdescr->next_descr_addr = descr->bus_addr;
        }
 
        return 0;
@@ -541,12 +537,16 @@ spider_net_refill_rx_chain(struct spider_net_card *card)
 static int
 spider_net_alloc_rx_skbs(struct spider_net_card *card)
 {
-       int result;
-       struct spider_net_descr_chain *chain;
+       struct spider_net_descr_chain *chain = &card->rx_chain;
+       struct spider_net_descr *start = chain->tail;
+       struct spider_net_descr *descr = start;
 
-       result = -ENOMEM;
+       /* Link up the hardware chain pointers */
+       do {
+               descr->prev->hwdescr->next_descr_addr = descr->bus_addr;
+               descr = descr->next;
+       } while (descr != start);
 
-       chain = &card->rx_chain;
        /* Put at least one buffer into the chain. if this fails,
         * we've got a problem. If not, spider_net_refill_rx_chain
         * will do the rest at the end of this function. */
@@ -563,7 +563,7 @@ spider_net_alloc_rx_skbs(struct spider_net_card *card)
 
 error:
        spider_net_free_rx_chain_contents(card);
-       return result;
+       return -ENOMEM;
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to