|
|
@@ -3107,13 +3107,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);
|