diff options
author | Krzysztof Piotr Oledzki <ole@ans.pl> | 2010-10-06 17:28:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-06 17:28:22 -0400 |
commit | 546add79468183f266c75c632c96e4b0029e0d96 (patch) | |
tree | 1be2cca38edc0d2fdc2f5fc2c9cdddb0585cbaa3 | |
parent | 700c2a779e6d5a60e2ef4716e75ea7f41546602f (diff) |
bonding: reread information about speed and duplex when interface goes up
When an interface was enslaved when it was down, bonding thinks
it has speed -1 even after it goes up. This leads into selecting
a wrong active interface in active/backup mode on mixed 10G/1G or
1G/100M environment.
before:
bonding: bond0: link status definitely up for interface eth5, 100 Mbps full duplex.
bonding: bond0: link status definitely up for interface eth0, 100 Mbps full duplex.
after:
bonding: bond0: link status definitely up for interface eth5, 10000 Mbps full duplex.
bonding: bond0: link status definitely up for interface eth0, 1000 Mbps full duplex.
Signed-off-by: Krzysztof Piotr Oledzki <ole@ans.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index e498ce3defad..d5004826d19e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -2406,6 +2406,8 @@ static void bond_miimon_commit(struct bonding *bond) | |||
2406 | slave->state = BOND_STATE_BACKUP; | 2406 | slave->state = BOND_STATE_BACKUP; |
2407 | } | 2407 | } |
2408 | 2408 | ||
2409 | bond_update_speed_duplex(slave); | ||
2410 | |||
2409 | pr_info("%s: link status definitely up for interface %s, %d Mbps %s duplex.\n", | 2411 | pr_info("%s: link status definitely up for interface %s, %d Mbps %s duplex.\n", |
2410 | bond->dev->name, slave->dev->name, | 2412 | bond->dev->name, slave->dev->name, |
2411 | slave->speed, slave->duplex ? "full" : "half"); | 2413 | slave->speed, slave->duplex ? "full" : "half"); |