public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Florian Fainelli <florian@openwrt•org>
To: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit
Date: Sun, 31 May 2009 22:59:15 +0200	[thread overview]
Message-ID: <200905312259.16127.florian@openwrt.org> (raw)

From: Stefan Weil <weil@mail•berlios.de>

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>
---
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 08e2f67..58afafb 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -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);
 	}
 }

             reply	other threads:[~2009-05-31 20:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-31 20:59 Florian Fainelli [this message]
2009-06-01  9:58 ` [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit David Miller
2009-06-01 16:36   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200905312259.16127.florian@openwrt.org \
    --to=florian@openwrt$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox