bnx2: Prevent "scheduling while atomic" warning with cnic, bonding and vlan.
authorMichael Chan <mchan@broadcom.com>
Tue, 27 Apr 2010 11:28:10 +0000 (11:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Apr 2010 21:38:16 +0000 (14:38 -0700)
commit212f9934afccf9c97399216b694a7f452526d6da
treeb759229660e9fe5848bd04f9b15816f15e8c1972
parentc441b8d2cb2194b05550a558d6d95d8944e56a84
bnx2: Prevent "scheduling while atomic" warning with cnic, bonding and vlan.

The bonding driver calls ndo_vlan_rx_register() while holding bond->lock.
The bnx2 driver calls bnx2_netif_stop() to stop the rx handling while
changing the vlgrp.  The call also stops the cnic driver which sleeps
while the bond->lock is held and cause the warning.

This code path only needs to stop the NAPI rx handling while we are
changing the vlgrp.  Since no reset is going to occur, there is no need
to stop cnic in this case.  By adding a parameter to bnx2_netif_stop()
to skip stopping cnic, we can avoid the warning.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c