diff options
author | Guillaume Chazarain <guichaz@gmail.com> | 2010-11-06 02:39:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-08 15:17:07 -0500 |
commit | 18543a643fae694982c7d89c22436885f3506497 (patch) | |
tree | 0674a2db40dcfd1d5c6999f600df6c8147f73df3 /include/linux/netdevice.h | |
parent | 63f4e1903ae41b4e457dd4490afe0f59e7641ad6 (diff) |
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.
Signed-off-by: Guillaume Chazarain <guichaz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | 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 072652d94d9f..d8fd2c23a1b9 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) | |||
1554 | 1554 | ||
1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) | 1555 | static inline void netif_tx_stop_queue(struct netdev_queue *dev_queue) |
1556 | { | 1556 | { |
1557 | if (WARN_ON(!dev_queue)) { | ||
1558 | printk(KERN_INFO "netif_stop_queue() cannot be called before " | ||
1559 | "register_netdev()"); | ||
1560 | return; | ||
1561 | } | ||
1557 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); | 1562 | set_bit(__QUEUE_STATE_XOFF, &dev_queue->state); |
1558 | } | 1563 | } |
1559 | 1564 | ||