Skip to content

Commit 9d591fc

Browse files
elkablodavem330
authored andcommitted
net: dsa: mv88e6xxx: Unforce speed & duplex in mac_link_down()
Commit 64d47d5 ("net: dsa: mv88e6xxx: configure interface settings in mac_config") removed forcing of speed and duplex from mv88e6xxx_mac_config(), where the link is forced down, and left it only in mv88e6xxx_mac_link_up(), by which time link is unforced. It seems that (at least on 88E6190) when changing cmode to 2500base-x, if the link is not forced down, but the speed or duplex are still forced, the forcing of new settings for speed & duplex doesn't take in mv88e6xxx_mac_link_up(). Fix this by unforcing speed & duplex in mv88e6xxx_mac_link_down(). Fixes: 64d47d5 ("net: dsa: mv88e6xxx: configure interface settings in mac_config") Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a8d1361 commit 9d591fc

File tree

1 file changed

+4
-0
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+4
-0
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@ static void mv88e6xxx_mac_link_down(struct dsa_switch *ds, int port,
768768
if ((!mv88e6xxx_port_ppu_updates(chip, port) ||
769769
mode == MLO_AN_FIXED) && ops->port_sync_link)
770770
err = ops->port_sync_link(chip, port, mode, false);
771+
772+
if (!err && ops->port_set_speed_duplex)
773+
err = ops->port_set_speed_duplex(chip, port, SPEED_UNFORCED,
774+
DUPLEX_UNFORCED);
771775
mv88e6xxx_reg_unlock(chip);
772776

773777
if (err)

0 commit comments

Comments
 (0)