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

From: Michal Smulski
Date: Thu Jun 01 2023 - 19:17:27 EST


I was not aware of phylink_decode_usxgmii_word(). I would be happy to re-do this patch and remove #defines as per your comments.

Regards,
Michal


-----Original Message-----
From: Russell King <linux@xxxxxxxxxxxxxxx>
Sent: Thursday, June 1, 2023 3:43 PM
To: msmulski2@xxxxxxxxx
Cc: andrew@xxxxxxx; f.fainelli@xxxxxxxxx; olteanv@xxxxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; simon.horman@xxxxxxxxxxxx; kabel@xxxxxxxxxx; Michal Smulski <michal.smulski@xxxxxxxx>
Subject: Re: [PATCH net-next v5 1/1] net: dsa: mv88e6xxx: implement USXGMII mode for mv88e6393x

CAUTION: This email is originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


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!