cpmac: prevent fatal exception in cpmac_end_xmit
Subsystems (2)
PATCH 2/2 cpmac: prevent fatal exception in cpmac_end_xmit
From: Stefan Weil <[email protected]>
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.
---
drivers/net/cpmac.c +2 -2
@@ -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); } }
From: Florian Fainelli <[email protected]>
Date: Sun, 31 May 2009 22:59:15 +0200
Quoted 10 lines
From: Stefan Weil <[email protected]>
We should not be stopping the subqueues in
cpmac_end_xmitbut rather test the status of them. Replace the calls tonetif_subqueue_stopby__netif_subqueue_stopped. This fixes an unrecoverable exception from happening when running the driver.Signed-off-by Stefan Weil <[email protected]>Signed-off-by Florian Fainelli <[email protected]>
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.
Hi David,
Le Monday 01 June 2009 11:58:18 David Miller, vous avez écrit :
Quoted 18 lines
From: Florian Fainelli <[email protected]>
Date: Sun, 31 May 2009 22:59:15 +0200Quoted 10 lines
From: Stefan Weil <[email protected]>
We should not be stopping the subqueues in
cpmac_end_xmitbut rather test the status of them. Replace the calls tonetif_subqueue_stopby__netif_subqueue_stopped. This fixes an unrecoverable exception from happening when running the driver.Signed-off-by Stefan Weil <[email protected]>Signed-off-by Florian Fainelli <[email protected]>Applied, but this commit message was completely wrong and therefore misleading to anyone trying to track down why this change was made.
Quoted 7 lines
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.
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------