]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: make speed, duplex setting consistent with link state
authorMahesh Bandewar <maheshb@google.com>
Mon, 27 Mar 2017 18:37:35 +0000 (11:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Mar 2017 04:11:50 +0000 (21:11 -0700)
commitbf15ad9616f762dd1fd01f2fa11329fdc745e494
tree4196bad4914a2b43bb9d319213c5de78f0a113bd
parent7bd12da0d40baa41261c837cb25aaf8b0b0e297e
bonding: make speed, duplex setting consistent with link state

bond_update_speed_duplex() retrieves speed and duplex settings. There
is a possibility of failure in retrieving these values but caller has
to assume it's always successful. This leads to having inconsistent
slave link settings. If these (speed, duplex) values cannot be
retrieved, then keeping the link UP causes problems.

The updated bond_update_speed_duplex() returns 0 on success if it
retrieves sane values for speed and duplex. On failure it returns 1
and marks the link down.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c