[PATCH net-next v10 11/15] net: phy: at803x: Support SFP through phy_port interface
Maxime Chevallier
maxime.chevallier at bootlin.com
Mon Aug 4 06:56:41 PDT 2025
On Sat, 26 Jul 2025 23:24:36 +0200
Andrew Lunn <andrew at lunn.ch> wrote:
> On Tue, Jul 22, 2025 at 02:16:16PM +0200, Maxime Chevallier wrote:
> > Convert the at803x driver to use the generic phylib SFP handling, via a
> > dedicated .attach_port() callback, populating the supported interfaces.
> >
> > As these devices are limited to 1000BaseX, a workaround is used to also
> > support, in a very limited way, copper modules. This is done by
> > supporting SGMII but limiting it to 1G full duplex (in which case it's
> > somwhat compatible with 1000BaseX).
>
> Missing e
>
> > +static int at8031_attach_port(struct phy_device *phydev, struct phy_port *port)
> > {
>
> ...
>
> > + if (!port->is_mii)
> > + return 0;
>
> That seems common to all these drivers? Can it be pulled into the
> core?
If we pull that into the core, we'll need to add specialised
.attach_port() callbacks in phy_driver, such as
.attach_mii_port() or .attach_serdes_port()
.attach_mdi_port()
I'm perfectly OK with that though :)
>
> > - if (iface == PHY_INTERFACE_MODE_SGMII)
> > - dev_warn(&phydev->mdio.dev, "module may not function if 1000Base-X not supported\n");
>
> I think we need to keep this warning. I don't remember the details,
> but i think this is the kernel saying the hardware is broken, this
> might not work, we will give it a go, but don't blame me if it does
> not work. We need to keep this disclaimer.
Sure thing, looking at it now I'm not sure why I removed that...
I'll add it back,
Maxime
More information about the linux-arm-kernel
mailing list