cpmac: prevent fatal exception in cpmac_end_xmit
authorStefan Weil <weil@mail.berlios.de>
Sun, 31 May 2009 10:59:15 +0000 (10:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2009 09:56:39 +0000 (02:56 -0700)
We should not be stopping the subqueues in cpmac_end_xmit
but rather test the status of them. Replace the calls to
netif_subqueue_stop by __netif_subqueue_stopped. This
fixes an unrecoverable exception from happening when
running the driver.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/cpmac.c

index 08e2f67adfb40aae6642c11ca0336d20dbb4cbc2..58afafbd3b9cb9695bcf6fe570c07b493a30d881 100644 (file)
@@ -615,13 +615,13 @@ static void cpmac_end_xmit(struct net_device *dev, int queue)
 
                dev_kfree_skb_irq(desc->skb);
                desc->skb = NULL;
-               if (netif_subqueue_stopped(dev, queue))
+               if (__netif_subqueue_stopped(dev, queue))
                        netif_wake_subqueue(dev, queue);
        } else {
                if (netif_msg_tx_err(priv) && net_ratelimit())
                        printk(KERN_WARNING
                               "%s: end_xmit: spurious interrupt\n", dev->name);
-               if (netif_subqueue_stopped(dev, queue))
+               if (__netif_subqueue_stopped(dev, queue))
                        netif_wake_subqueue(dev, queue);
        }
 }