From: Guillaume Chazarain <guichaz@gmail.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: Guillaume Chazarain <guichaz@gmail.com>
Subject: [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev()
Date: Sat, 6 Nov 2010 17:39:32 +0100 [thread overview]
Message-ID: <1289061572-5029-2-git-send-email-guichaz@gmail.com> (raw)
In-Reply-To: <1289061572-5029-1-git-send-email-guichaz@gmail.com>
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
next prev parent reply other threads:[~2010-11-06 16:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-11-08 20:19 ` [PATCH 2/2] net: Detect and ignore netif_stop_queue() calls before register_netdev() David Miller
2010-11-08 20:19 ` [PATCH 1/2] skge: Remove tx queue stopping in skge_devinit() David Miller
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=1289061572-5029-2-git-send-email-guichaz@gmail.com \
--to=guichaz@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).