On Sun, Jul 19, 2020 at 12:00:35PM +0100, Russell King wrote:
> 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+ker...@armlinux.org.uk>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 20 +++++++++++++++++---
>  drivers/net/dsa/mv88e6xxx/chip.h |  1 +
>  2 files changed, 18 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c 
> b/drivers/net/dsa/mv88e6xxx/chip.c
> index 0bce26f1df93..9c7b8cf0e39a 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -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;

David might not like the reverse christmas tree breakage, but:

Reviewed-by: Andrew Lunn <and...@lunn.ch>

    Andrew

Reply via email to