Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-09-17 14:24:49 +0200
committerMichal Kubecek <mkubecek@suse.cz>2019-09-17 14:24:55 +0200
commit58836566346808a74c568d8b56f45e4cfc3d9ada (patch)
treecae6757d48ccd96d4bddb2c340f92b71b0a7813c
parentbb6ff372d3c489f841e5700ed086870214f4edc0 (diff)
bonding/802.3ad: fix slave link initialization transition states
(bsc#1137069 bsc#1141013). suse-commit: df6116d9a47fbe8aebcb9d8fdaedb72100c54e44
-rw-r--r--drivers/net/bonding/bond_main.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index a9afffd5ab05..ae92f914fde7 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3088,13 +3088,18 @@ static int bond_slave_netdev_event(unsigned long event,
case NETDEV_CHANGE:
/* For 802.3ad mode only:
* Getting invalid Speed/Duplex values here will put slave
- * in weird state. So mark it as link-fail for the time
- * being and let link-monitoring (miimon) set it right when
- * correct speeds/duplex are available.
+ * in weird state. Mark it as link-fail if the link was
+ * previously up or link-down if it hasn't yet come up, and
+ * let link-monitoring (miimon) set it right when correct
+ * speeds/duplex are available.
*/
if (bond_update_speed_duplex(slave) &&
- BOND_MODE(bond) == BOND_MODE_8023AD)
- slave->link = BOND_LINK_FAIL;
+ BOND_MODE(bond) == BOND_MODE_8023AD) {
+ if (slave->last_link_up)
+ slave->link = BOND_LINK_FAIL;
+ else
+ slave->link = BOND_LINK_DOWN;
+ }
if (BOND_MODE(bond) == BOND_MODE_8023AD)
bond_3ad_adapter_speed_duplex_changed(slave);