Subject: Re: [net-next PATCH 3/3] net: phy: add support for PHY package MMD read/write

From: Christian Marangi <[email-masked]>
Date: Sun, 26 Nov 2023 19:24:37 +0100

On Sun, Nov 26, 2023 at 07:14:52PM +0100, Andrew Lunn wrote:
> On Sun, Nov 26, 2023 at 01:37:48AM +0100, Christian Marangi wrote:
> > Some PHY in PHY package may require to read/write MMD regs to correctly
> > configure the PHY package.
> > 
> > Add support for these additional required function in both lock and no
> > lock variant.
> 
> You are assuming the PHY only supports C45 over C22. But what about
> those PHYs which have native C45? And maybe don't have C22 at all?
> 
> You should refactor the code of __phy_read_mmd() into a helper and use
> it here.
>

Have to be honest here and chose the ""easy"" way. Was a little scared
by all the complexity with mmd with C45 and C22... The idea was to add
C22 support for now and if used by others extend the function. But I
guess with the generic approach we are taking it's better to handle it
now. Will update this in v2.

-- 
	Ansuel