]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc/cell spidernet force-end fix
authorLinas Vepstas <linas@austin.ibm.com>
Tue, 10 Oct 2006 21:00:04 +0000 (16:00 -0500)
committerJeff Garzik <jeff@garzik.org>
Wed, 11 Oct 2006 08:04:25 +0000 (04:04 -0400)
Bugfix: when cleaning up the transmit queue upon device close,
be sure to walk the entire queue.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Cc: James K Lewis <jklewis@us.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/spider_net.c

index ff409a10274e7f287d31b9f7f3910785145d65dd..52bf1b2968b3c0f293f90154a1723f31b2ecf1d5 100644 (file)
@@ -699,6 +699,8 @@ spider_net_release_tx_descr(struct spider_net_card *card)
 
        /* unmap the skb */
        skb = descr->skb;
+       if (!skb)
+               return;
        pci_unmap_single(card->pdev, descr->buf_addr, skb->len,
                        PCI_DMA_TODEVICE);
        dev_kfree_skb_any(skb);
@@ -751,7 +753,8 @@ spider_net_release_tx_chain(struct spider_net_card *card, int brutal)
 
                default:
                        card->netdev_stats.tx_dropped++;
-                       return 1;
+                       if (!brutal)
+                               return 1;
                }
                spider_net_release_tx_descr(card);
        }