netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit()
@ 2010-11-06 16:39 Guillaume Chazarain
  2010-11-06 16:39 ` [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev() Guillaume Chazarain
  2010-11-08 20:19 ` [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Guillaume Chazarain @ 2010-11-06 16:39 UTC (permalink / raw)
  To: davem, netdev; +Cc: Guillaume Chazarain

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

Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>
---
 drivers/net/skge.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index bfec2e0..220e039 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -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;
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev()
  2010-11-06 16:39 [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() Guillaume Chazarain
@ 2010-11-06 16:39 ` Guillaume Chazarain
  2010-11-08 20:19   ` David Miller
  2010-11-08 20:19 ` [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Guillaume Chazarain @ 2010-11-06 16:39 UTC (permalink / raw)
  To: davem, netdev; +Cc: Guillaume Chazarain

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.

Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>
---
 include/linux/netdevice.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 072652d..d8fd2c2 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -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);
 }
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit()
  2010-11-06 16:39 [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() Guillaume Chazarain
  2010-11-06 16:39 ` [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev() Guillaume Chazarain
@ 2010-11-08 20:19 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2010-11-08 20:19 UTC (permalink / raw)
  To: guichaz; +Cc: netdev

From: Guillaume Chazarain <guichaz@gmail.com>
Date: Sat,  6 Nov 2010 17:39:31 +0100

> After e6484930d7c73d324bccda7d43d131088da697b9: net: allocate tx queues in register_netdevice
> It causes an Oops at skge_probe() time.
> 
> Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev()
  2010-11-06 16:39 ` [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev() Guillaume Chazarain
@ 2010-11-08 20:19   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-11-08 20:19 UTC (permalink / raw)
  To: guichaz; +Cc: netdev

From: Guillaume Chazarain <guichaz@gmail.com>
Date: Sat,  6 Nov 2010 17:39:32 +0100

> 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.
> 
> Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-08 20:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-06 16:39 [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() Guillaume Chazarain
2010-11-06 16:39 ` [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev() Guillaume Chazarain
2010-11-08 20:19   ` David Miller
2010-11-08 20:19 ` [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() David Miller

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).