* [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit
@ 2009-05-31 20:59 Florian Fainelli
2009-06-01 9:58 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2009-05-31 20:59 UTC (permalink / raw)
To: David Miller, netdev
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);
}
}
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit
2009-05-31 20:59 [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit Florian Fainelli
@ 2009-06-01 9:58 ` David Miller
2009-06-01 16:36 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2009-06-01 9:58 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Sun, 31 May 2009 22:59:15 +0200
> 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>
Applied, but this commit message was completely wrong and
therefore misleading to anyone trying to track down why this
change was made.
The problem is that netif_subqueue_stopped() takes a SKB
pointer, whereas we're passing in an integer queue index
here.
Therefore, merely providing the obvious compile warning that
was produced by this incorrect argument type would have
explained everything, and accurately.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit
2009-06-01 9:58 ` David Miller
@ 2009-06-01 16:36 ` Florian Fainelli
0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2009-06-01 16:36 UTC (permalink / raw)
To: David Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
Hi David,
Le Monday 01 June 2009 11:58:18 David Miller, vous avez écrit :
> From: Florian Fainelli <florian@openwrt.org>
> Date: Sun, 31 May 2009 22:59:15 +0200
>
> > 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>
>
> Applied, but this commit message was completely wrong and
> therefore misleading to anyone trying to track down why this
> change was made.
>
> The problem is that netif_subqueue_stopped() takes a SKB
> pointer, whereas we're passing in an integer queue index
> here.
>
> Therefore, merely providing the obvious compile warning that
> was produced by this incorrect argument type would have
> explained everything, and accurately.
You are right I should have given you the right description. Thanks for
applying it anyway.
--
Best regards, Florian Fainelli
Email : florian@openwrt.org
http://openwrt.org
-------------------------------
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-01 17:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-31 20:59 [PATCH net-next 2/2] cpmac: prevent fatal exception in cpmac_end_xmit Florian Fainelli
2009-06-01 9:58 ` David Miller
2009-06-01 16:36 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).