Skip to content

Commit

Permalink
net: Detect and ignore netif_stop_queue() calls before register_netdev()
Browse files Browse the repository at this point in the history
After e648493: 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>
  • Loading branch information
Guillaume Chazarain authored and David S. Miller committed Nov 8, 2010
1 parent 63f4e19 commit 18543a6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 18543a6

Please sign in to comment.