Re: [net-next: PATCH 01/12] net: phy: fixed_phy: switch to fwnode_ API

From: Russell King (Oracle)
Date: Tue Jun 21 2022 - 06:02:07 EST


On Tue, Jun 21, 2022 at 11:56:06AM +0200, Marcin Wojtas wrote:
> pon., 20 cze 2022 o 19:59 Andrew Lunn <andrew@xxxxxxx> napisał(a):
> >
> > On Mon, Jun 20, 2022 at 05:02:14PM +0200, Marcin Wojtas wrote:
> > > This patch allows to use fixed_phy driver and its helper
> > > functions without Device Tree dependency, by swtiching from
> > > of_ to fwnode_ API.
> >
> > Do you actually need this? phylink does not use this code, it has its
> > own fixed link implementation. And that implementation is not limited
> > to 1G.
> >
>
> Yes, phylink has its own fixed-link handling, however the
> net/dsa/port.c relies on fixed_phy helpers these are not 1:1
> equivalents. I assumed this migration (fixed_phy -> phylink) is not
> straightforward and IMO should be handled separately. Do you recall
> justification for not using phylink in this part of net/dsa/*?

All modern DSA drivers use phylink and not fixed-phy as far as I'm
aware - there are a number that still implement the .adjust_link
callback, but note in dsa_port_link_register_of():

if (!ds->ops->adjust_link) {
...
return 0;
}

dev_warn(ds->dev,
"Using legacy PHYLIB callbacks. Please migrate to PHYLINK!\n");

It's really just that they haven't been migrated.

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