[PATCH] net: dsa: mv88e6xxx: Respect SPEED_UNFORCED, don't set force bit

Subsystems: marvell 88e6xxx ethernet switch fabric driver, networking drivers, networking [dsa], the rest

STALE3550d

3 messages, 3 authors, 2016-11-17 · open the first message on its own page

[PATCH] net: dsa: mv88e6xxx: Respect SPEED_UNFORCED, don't set force bit

From: Andrew Lunn <andrew@lunn.ch>
Date: 2016-11-16 03:27:07

The SPEED_UNFORCED indicates the MAC & PHY should perform
auto-negotiation to determine a speed which works. If this is called
for, don't set the force bit. If it is set, the MAC actually does
10Gbps, why the internal PHYs don't support.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/dsa/mv88e6xxx/port.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index e4978f6367aa..af4772d86086 100644
--- a/drivers/net/dsa/mv88e6xxx/port.c
+++ b/drivers/net/dsa/mv88e6xxx/port.c
@@ -213,7 +213,7 @@ static int mv88e6xxx_port_set_speed(struct mv88e6xxx_chip *chip, int port,
 		reg &= ~PORT_PCS_CTRL_ALTSPEED;
 	if (force_bit) {
 		reg &= ~PORT_PCS_CTRL_FORCE_SPEED;
-		if (speed)
+		if (speed != SPEED_UNFORCED)
 			ctrl |= PORT_PCS_CTRL_FORCE_SPEED;
 	}
 	reg |= ctrl;
-- 
2.10.2

Re: [PATCH] net: dsa: mv88e6xxx: Respect SPEED_UNFORCED, don't set force bit

From: David Miller <davem@davemloft.net>
Date: 2016-11-16 19:34:32

From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 16 Nov 2016 04:26:48 +0100
The SPEED_UNFORCED indicates the MAC & PHY should perform
auto-negotiation to determine a speed which works. If this is called
for, don't set the force bit. If it is set, the MAC actually does
10Gbps, why the internal PHYs don't support.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
What tree is this for?  This is a fix but the patch doesn't apply to
'net'.

Re: [PATCH] net: dsa: mv88e6xxx: Respect SPEED_UNFORCED, don't set force bit

From: Vivien Didelot <hidden>
Date: 2016-11-17 03:25:40

Hi Andrew,

Andrew Lunn [off-list ref] writes:
The SPEED_UNFORCED indicates the MAC & PHY should perform
auto-negotiation to determine a speed which works. If this is called
for, don't set the force bit. If it is set, the MAC actually does
10Gbps, why the internal PHYs don't support.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Fixes: 96a2b40c7bd3 ("net: dsa: mv88e6xxx: add port's MAC speed setter")

Reviewed-by: Vivien Didelot <redacted>

David, this is for net-next.

Thanks!

        Vivien
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help