From: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> Date: Sun, 19 Jul 2020 12:00:35 +0100 > If in-band negotiation or fixed-link modes are specified for a DSA > port, the DSA code will force the link down during initialisation. For > fixed-link mode, this is fine, as phylink will manage the link state. > However, for in-band mode, phylink expects the PCS to detect link, > which will not happen if the link is forced down. > > There is a related issue that in in-band mode, the link could come up > while we are making configuration changes, so we should force the link > down prior to reconfiguring the interface mode. > > This patch addresses both issues. > > Fixes: 3be98b2d5fbc ("net: dsa: Down cpu/dsa ports phylink will control") > Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxx> Applied and queued up for -stable, but: > @@ -664,6 +664,7 @@ static void mv88e6xxx_mac_config(struct dsa_switch *ds, int port, > const struct phylink_link_state *state) > { > struct mv88e6xxx_chip *chip = ds->priv; > + struct mv88e6xxx_port *p = &chip->ports[port]; > int err; I fixed the reverse christmas tree breakage here by moving the 'p' assignment into the function body.