]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 27 Mar 2013 02:41:05 +0000 (02:41 +0000)
commit0edce478d1ce9bb9bfca84350e41962a180b401f
tree3a2a000b2f4299e0bc43d5ee0e02fe748eef1662
parentec207c103236a1fa33b838e7710c07253b839962
bonding: don't call update_speed_duplex() under  spinlocks

[ Upstream commit 876254ae2758d50dcb08c7bd00caf6a806571178 ]

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 546add79, 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/bonding/bond_main.c