Subject: Re: [PATCH net-next 4/8] net: dsa: mv88e6xxx: extend phylink to Serdes PHYs

From: Andrew Lunn <[email-masked]>
Date: Sat, 14 Mar 2020 19:47:50 +0100

> @@ -683,9 +754,14 @@ static void mv88e6xxx_mac_link_up(struct dsa_switch *ds, int port,
>  		/* 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
> -		 * handled in the Marvell hardware? E.g. port 4 on 88E6532
> +		 * handled in the Marvell hardware? E.g. port 2 on 88E6390
>  		 * shared between internal PHY and Serdes.
>  		 */

automedia makes things interesting. You have to read the cmode to know
if the internal PHY or the SERDES has 'won'. I thimk my preference
would of been to keep it simple and look at phy-mode in DT. If it is
1000BaseX, turn on the SERDES and turn off the internal PHY. But i
know of at lease one person who wants auto media.

> +static int mv88e6xxx_serdes_pcs_get_state(struct mv88e6xxx_chip *chip,
> +					  u16 status, u16 lpa,
> +					  struct phylink_link_state *state)
> +{

At some point in the future, we might want to rename this. If i
remember correct, the 1000BaseX and SGMII PCS uses different registers
to the 10G PCS. We will need to look at the cmode to determine which
PCS is in operation.

Reviewed-by: Andrew Lunn <[email-masked]>

    Andrew