bonding: fix slave speed reporting in bond_miimon_commit
Subsystems (3)
PATCH 1/1 bonding: fix slave speed reporting in bond_miimon_commit
From: Nikolay Aleksandrov <[email protected]>
When we have BOND_LINK_UP the speed is reported unconditionally with %u format although it can be SPEED_UNKNOWN (-1). After this patch it returns 0 in that case in an attempt to keep the existing scripts happy. One line is intenionally left 81 chars because it gets ugly if broken.
---
If the scripts are not a concern I can re-post with a string "unknown".
drivers/net/bonding/bond_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +2 -1
@@ -2413,7 +2413,8 @@ static void bond_miimon_commit(struct bonding *bond)pr_info ("%s: link status definitely up for interface %s, %u Mbps %s duplex.\n" , bond->dev->name, slave->dev->name, - slave->speed, slave->duplex ?"full" :"half" ); + slave->speed ==SPEED_UNKNOWN ?0 : slave->speed, + slave->duplex ?"full" :"half" );/* notify ad that the link status has changed */ if (bond->params.mode ==BOND_MODE_8023AD )
Signature · 1 line
1.8.1.4
Quoted 9 lines · On Thu, Jun 20, 2013 at 02:34:13PM +0200, [email protected] wrote:
From: Nikolay Aleksandrov <[email protected]>
When we have
BOND_LINK_UPthe speed is reported unconditionally with %u format although it can beSPEED_UNKNOWN(-1). After this patch it returns 0 in that case in an attempt to keep the existing scripts happy. One line is intenionally left 81 chars because it gets ugly if broken.Signed-off-by Nikolay Aleksandrov <[email protected]>
From: Veaceslav Falico <[email protected]>
Date: Thu, 20 Jun 2013 15:42:48 +0200
Quoted 10 lines · On Thu, Jun 20, 2013 at 02:34:13PM +0200, [email protected] wrote:
Quoted 9 lines
From: Nikolay Aleksandrov <[email protected]>
When we have
BOND_LINK_UPthe speed is reported unconditionally with %u
format although it can beSPEED_UNKNOWN(-1). After this patch it returns
0 in that case in an attempt to keep the existing scripts happy. One line is intenionally left 81 chars because it gets ugly if broken.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Nikolay Aleksandrov <[email protected]>Acked-by Veaceslav Falico <[email protected]>
Applied.