Subject: Re: [PATCH net-next] net: phylink: allow PHYs to be attached in 802.3z inband mode

From: "Russell King (Oracle)" <[email-masked]>
Date: Mon, 30 Mar 2026 13:32:45 +0100

On Mon, Mar 30, 2026 at 02:26:58PM +0200, Andrew Lunn wrote:
> > As I've recently said, I think we're more or less boxed in between a
> > rock and a hard place because of the hacks that qcom-ethqos introduced
> > with its PCS support. At the moment, I am failing to see any path where
> > the stmmac PCS can be programmed for inband according to phylink's
> > wishes and qcom-ethqos can be made to work without its hacks.
> > 
> > This all ultimately comes back to the half-hearted phylink conversion
> > of stmmac that was done behind my back without my review. Had the
> > conversion been done fully, and kept up with the phylink changes for
> > PCS support, then we probably wouldn't be in this situation today.
> > 
> > Unfortunately, the driver is going to keep breaking all the time that
> > it abuses phylink, and at the moment I see no way to stop this sodding
> > driver abusing phylink.
> 
> "The needs of the many outweigh the needs of the few"
> 
> The MAC driver is used by a lot of different SoCs. If qcom-ethqos
> caused this problem, should we consider breaking backwards
> compatibility for it, if that opens up a path for getting clean
> phylink integration for all the other variants?

Consider something like mvneta (which supports 2.5G speeds) connected
to a 2.5G PHY that uses 2500BASE-X for 2.5G speeds, and SGMII for
slower speeds with inband.

How should this be described in DT?

	phy-mode = "2500base-x";
	managed = "in-band-status";

will fail today, as these tests will refuse to attach a PHY in that
setup, and without a PHY attached, we will never know if it switches
to SGMII mode.

This patch makes phylink more flexible and permissive.

However, as has been found, this patch causes problems for stmmac,
so it needs a different approach, because stmmac interprets an
optional PHY as "we must have a PHY if we don't we fail" at the
moment.

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