]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit66fd51a78c2bd211d0c5f333e405db6efc7682ea
treeb759229660e9fe5848bd04f9b15816f15e8c1972
parentc8de27cba7243e3b2db1661967698b46fe3dd9d2
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