Thread (4 messages) 4 messages, 2 authors, 3d ago

Re: [PATCH net v2] net: pcs: xpcs: make supported_interfaces authoritative

flat view

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-10-29 13:21:08
Also in: linux-rockchip, lkml

On Thu, Oct 29, 2026 at 06:27:29PM +0800, Coia Prant wrote:
pcs.supported_interfaces is the mask of interfaces a given xpcs
instance actually supports. The compat table describes what the
Synopsys IP can do in general, but a specific integration may support
a different subset: the RK3568 XPCS supports 1000BASE-X, SGMII and
QSGMII in hardware, but does not implement the C73 10G or 2500BASE-X
modes that the Synopsys compat table advertises.

The Rockchip glue currently advertises only SGMII, since that is what
the RK3568 MAC side supports today. 1000BASE-X and QSGMII can be added
later when the MAC side gains support.

Without narrowing the mask, stmmac_phylink_setup() merges the PCS
supported_interfaces into the MAC mask with phy_interface_or(), so the
XPCS would contribute 1000BASE-X, 2500BASE-X, USXGMII and the 10G/25G
modes to the combined set. The MAC side forces the phy modes and
phylink start passes the mode explicitly, so this does not currently
make phylink switch to an unsupported mode, but the combined mask still
advertises interfaces the SoC cannot use.
I don't know this code too well, but something does not feel right
here. It might be due to the way stmmac does PCS with phylink, which
is often considered broken.

What i would expect to happen is that each piece of hardware indicates
what it can do, and then phylink finds the common modes.

So maybe stmmac_phylink_setup() is wrong when it ORs them together?

Maybe look at other MAC drivers using pcs and phylink.

      Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help