summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-11-16 04:26:48 +0100
committerDavid S. Miller <davem@davemloft.net>2016-11-16 15:12:51 -0500
commit0b6e3d0322b39a5f3a974a0d3cb8677aeb8106a5 (patch)
treed2dc492193c0109d02ede04056d3c3fe8dba4e06 /drivers/net/dsa/mv88e6xxx
parenta11485b737aa9634e9dbb6f53e65e3a801fd1e4c (diff)
downloadop-kernel-dev-0b6e3d0322b39a5f3a974a0d3cb8677aeb8106a5.zip
op-kernel-dev-0b6e3d0322b39a5f3a974a0d3cb8677aeb8106a5.tar.gz
net: dsa: mv88e6xxx: Respect SPEED_UNFORCED, don't set force bit
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx')
-rw-r--r--drivers/net/dsa/mv88e6xxx/port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/port.c b/drivers/net/dsa/mv88e6xxx/port.c
index e4978f6..af4772d8 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;
OpenPOWER on IntegriCloud