Re: [net-next RFC PATCH v2 2/3] net: phy: Add support for Aeonsemi AS21xxx PHYs

From: Christian Marangi
Date: Wed Mar 26 2025 - 10:52:07 EST


On Wed, Mar 26, 2025 at 02:57:09PM +0100, Andrew Lunn wrote:
> > In summary, I really don't like this approach - it feels too much of a
> > hack, _and_ introduces the potential for drivers that makes use of this
> > to get stuff really very wrong. In my opinion that's not a model that
> > we should add to the kernel.
>
> I agree.
>
> >
> > I'll say again - why can't the PHY firmware be loaded by board firmware.
> > You've been silent on my feedback on this point. Given that you're
> > ignoring me... for this patch series...
>
> And i still think using the match op is something that should be
> investigated, alongside the bootloader loading firmware.
>

The main problem (as said in the other answer) is that I feel match op
won't solve the problem and doesn't seems the good place to do complex
operation like OF and load firmware.

But now that I think about it your idea was to define a match_phy_device
for each PHY ID... The generic PHY ID is detected and firmware is loaded
and the PHY ID is checked again?

That way any other call of match_phy_device for other PHY of the same
family will found the FW loaded and check the ID?

That might work but sound more like a trick than a solid implementation.

--
Ansuel