[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200323214900.14083-3-andrew@lunn.ch>
Date: Mon, 23 Mar 2020 22:49:00 +0100
From: Andrew Lunn <andrew@...n.ch>
To: David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Russell King <rmk+kernel@....linux.org.uk>,
Vivien Didelot <vivien.didelot@...il.com>,
Andrew Lunn <andrew@...n.ch>
Subject: [PATCH net-next 2/2] net: dsa: mv88e6xxx: Set link down when changing speed
The MAC control register must not be changed unless the link is down.
Add the necassary call into mv88e6xxx_mac_link_up. Without it, the MAC
does not change state, the link remains at the wrong speed.
Fixes: 30c4a5b0aad8 ("net: mv88e6xxx: use resolved link config in mac_link_up()")
Signed-off-by: Andrew Lunn <andrew@...n.ch>
---
drivers/net/dsa/mv88e6xxx/chip.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index dd8a5666a584..24ce17503950 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -733,6 +733,14 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port,
mv88e6xxx_reg_lock(chip);
if (!mv88e6xxx_port_ppu_updates(chip, port) || mode == MLO_AN_FIXED) {
+ /* Port's MAC control must not be changed unless the
+ * link is down
+ */
+ err = chip->info->ops->port_set_link(chip, port,
+ LINK_FORCED_DOWN);
+ if (err)
+ goto error;
+
/* FIXME: for an automedia port, should we force the link
* down here - what if the link comes up due to "other" media
* while we're bringing the port up, how is the exclusivity
--
2.26.0.rc2
Powered by blists - more mailing lists