]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: don't call update_speed_duplex() under spinlocks
authorVeaceslav Falico <vfalico@redhat.com>
Tue, 12 Mar 2013 06:31:32 +0000 (06:31 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Mar 2013 08:53:17 +0000 (04:53 -0400)
commit3341e10daa3956365a450e6dcb9b40870c53cbfd
tree0c9b2e5e350d76db147a150befa57cc6908de882
parenta151837c65ac3232ad24bdc22b4ea881d3d95496
bonding: don't call update_speed_duplex() under spinlocks

bond_update_speed_duplex() might sleep while calling underlying slave's
routines. Move it out of atomic context in bond_enslave() and remove it
from bond_miimon_commit() - it was introduced by commit c439640f, however
when the slave interfaces go up/change state it's their responsibility to
fire NETDEV_UP/NETDEV_CHANGE events so that bonding can properly update
their speed.

I've tested it on all combinations of ifup/ifdown, autoneg/speed/duplex
changes, remote-controlled and local, on (not) MII-based cards. All changes
are visible.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c