Re: [PATCH net-next v3 03/11] net: phy: replace is_c45 with phy_accces_mode

From: Russell King (Oracle)
Date: Tue Jul 18 2023 - 13:52:45 EST


On Tue, Jul 18, 2023 at 07:40:49PM +0200, Andrew Lunn wrote:
> > static inline bool phy_has_c45_registers(struct phy_device *phydev)
> > {
> > - return phydev->is_c45;
> > + return phydev->access_mode != PHY_ACCESS_C22;
> > }
>
> So this is making me wounder if we have a clean separation between
> register spaces and access methods.
>
> Should there be a phy_has_c22_registers() ?

Yes, I've been wondering that. I've recently heard about a Realtek PHY
which is supported by our realtek driver, but appears on a SFP that
can only do C45 accesses. However, the realtek driver is written to
use C22 accesses to this PHY - and the PHY supports both. So currently
it doesn't work.

That's just an additional data point for thinking about this, I haven't
formulated a solution to it yet.

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