projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63f4e19
)
net: Detect and ignore netif_stop_queue() calls before register_netdev()
author
Guillaume Chazarain
<
[email protected]
>
Sat, 6 Nov 2010 06:39:32 +0000
(06:39 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 8 Nov 2010 20:17:07 +0000
(12:17 -0800)
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 <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
include/linux/netdevice.h
patch
|
blob
|
history
diff --git
a/include/linux/netdevice.h
b/include/linux/netdevice.h
index 072652d94d9f5afe908f982c1acce9339bfbfc32..d8fd2c23a1b994ec10e0a204820d6c7daf7dca0e 100644
(file)
--- 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);
}