Re: [PATCH net-next v5 1/1] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

From: Russell King (Oracle)
Date: Thu Jun 01 2023 - 18:43:06 EST


On Thu, Jun 01, 2023 at 02:52:51PM -0700, msmulski2@xxxxxxxxx wrote:
> +/* USXGMII */
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_MASK GENMASK(11, 9)
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_5000 0xa00
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_2500 0x800
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_10000 0x600
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_1000 0x400
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_100 0x200
> +#define MV88E6390_USXGMII_PHY_STATUS_SPEED_10 0x000
> +#define MV88E6390_USXGMII_PHY_STATUS_DUPLEX_FULL BIT(12)
> +#define MV88E6390_USXGMII_PHY_STATUS_LINK BIT(15)

How is this different from the definitions in include/uapi/linux/mdio.h
(see MDIO_USXGMII_*). Have you considered using
phylink_decode_usxgmii_word() to decode these instead of reinventing the
wheel?

It would be nice to wait until we've converted 88e6xxx to phylink PCS
before adding this support, which is something that's been blocked for
a few years but should be unblocked either at the end of this cycle,
or certainly by 6.5-rc1. Andrew, would you agree?

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!