Commit fb9eb899 authored by Mahesh Bandewar's avatar Mahesh Bandewar Committed by David S. Miller

bonding: handle link transition from FAIL to UP correctly

When link transitions from LINK_FAIL to LINK_UP, the commit phase is
not called. This leads to an erroneous state causing slave-link state to
get stuck in "going down" state while its speed and duplex are perfectly
fine. This issue is a side-effect of splitting link-set into propose and
commit phases introduced by de77ecd4 ("bonding: improve link-status
update in mii-monitoring")

This patch fixes these issues by calling commit phase whenever link
state change is proposed.

Fixes: de77ecd4 ("bonding: improve link-status update in mii-monitoring")
Signed-off-by: default avatarMahesh Bandewar <maheshb@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4d49bc1
...@@ -2064,6 +2064,7 @@ static int bond_miimon_inspect(struct bonding *bond) ...@@ -2064,6 +2064,7 @@ static int bond_miimon_inspect(struct bonding *bond)
(bond->params.downdelay - slave->delay) * (bond->params.downdelay - slave->delay) *
bond->params.miimon, bond->params.miimon,
slave->dev->name); slave->dev->name);
commit++;
continue; continue;
} }
...@@ -2098,7 +2099,7 @@ static int bond_miimon_inspect(struct bonding *bond) ...@@ -2098,7 +2099,7 @@ static int bond_miimon_inspect(struct bonding *bond)
(bond->params.updelay - slave->delay) * (bond->params.updelay - slave->delay) *
bond->params.miimon, bond->params.miimon,
slave->dev->name); slave->dev->name);
commit++;
continue; continue;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment