diff mbox

[next] bonding: handle link transition from FAIL to UP correctly

Message ID 20170412053600.35646-1-mahesh@bandewar.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Mahesh Bandewar April 12, 2017, 5:36 a.m. UTC
From: Mahesh Bandewar <maheshb@google.com>

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 de77ecd4ef02 ("bonding: improve link-status
update in mii-monitoring")

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

Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
Signed-off-by: Mahesh Bandewar <maheshb@google.com>
---
 drivers/net/bonding/bond_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

David Miller April 13, 2017, 5:49 p.m. UTC | #1
From: Mahesh Bandewar <mahesh@bandewar.net>
Date: Tue, 11 Apr 2017 22:36:00 -0700

> From: Mahesh Bandewar <maheshb@google.com>
> 
> 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 de77ecd4ef02 ("bonding: improve link-status
> update in mii-monitoring")
> 
> This patch fixes these issues by calling commit phase whenever link
> state change is proposed.
> 
> Fixes: de77ecd4ef02 ("bonding: improve link-status update in mii-monitoring")
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index aba7352906a5..01e4a69af421 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2064,6 +2064,7 @@  static int bond_miimon_inspect(struct bonding *bond)
 					    (bond->params.downdelay - slave->delay) *
 					    bond->params.miimon,
 					    slave->dev->name);
+				commit++;
 				continue;
 			}
 
@@ -2098,7 +2099,7 @@  static int bond_miimon_inspect(struct bonding *bond)
 					    (bond->params.updelay - slave->delay) *
 					    bond->params.miimon,
 					    slave->dev->name);
-
+				commit++;
 				continue;
 			}