Skip to contentSkip to conversation

skge: Remove tx queue stopping in skge_devinit()

PATCH Applied Guillaume Chazarain 2 participants 4 messages Nov 6, 2010 – Nov 8, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 skge: Remove tx queue stopping in skge_devinit()

After e6484930d7c73d324bccda7d43d131088da697b9: net: allocate tx queues in register_netdevice It causes an Oops at skge_probe() time.

---
 drivers/net/skge.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/net/skge.c +0 -1
index bfec2e0..220e039 100644
@@ -3858,7 +3858,6 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
 
 	/* device is off until link detection */
 	netif_carrier_off(dev);
-	netif_stop_queue(dev);
 
 	return dev;
 }
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 net: Detect and ignore netif_stop_queue() calls before register_netdev()

After e6484930d7c73d324bccda7d43d131088da697b9: net: allocate tx queues in register_netdevice These calls make net drivers oops at load time, so let's avoid people git-bisect'ing known problems.

---
 include/linux/netdevice.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
include/linux/netdevice.h +5 -0
index 072652d..d8fd2c2 100644
@@ -1554,6 +1554,11 @@ static inline void netif_tx_wake_all_queues(struct net_device *dev)
 
 static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue)
 {
+	if (WARN_ON(!dev_queue)) {
+		printk(KERN_INFO "netif_stop_queue() cannot be called before "
+		       "register_netdev()");
+		return;
+	}
 	set_bit(__QUEUE_STATE_XOFF, &dev_queue->state);
 }
 
Signature · 1 line
1.7.1
maintainer Applied
#2 lore raw

Re: [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev()

From: Guillaume Chazarain <[email protected]>
Date: Sat, 6 Nov 2010 17:39:32 +0100

Quoted 5 lines

After e6484930d7c73d324bccda7d43d131088da697b9: net: allocate tx queues in register_netdevice These calls make net drivers oops at load time, so let's avoid people git-bisect'ing known problems.

Applied, but I'd like to remove this check after we've had some time to weed out all of the offending cases, since this sits in a hot path of sorts.

Thanks.