Thread (4 messages) read the whole thread 4 messages, 3 authors, 6d ago

Re: [PATCH net] net: stmmac: Skip PHY attach if custom PCS is in use

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-07-24 12:41:00
Also in: linux-arm-kernel, lkml

Hi,

On 7/22/26 15:47, Mohd Ayaan Anwar wrote:
On Wed, Jul 22, 2026 at 03:40:08PM +0200, Maxime Chevallier wrote:
quoted
Hi,

+Mohd

On 7/22/26 15:19, Zxyan Zhu wrote:
quoted
When a platform provides a custom PCS via the pcs_init callback
(e.g., for USXGMII with in-band autoneg), the MAC's phylink_pcs
is already configured. In this case, phylink validates against
the PCS's supported interfaces and manages link state through
the PCS, so no traditional PHY device is needed.

Without this, stmmac_init_phy() falls through to the
no-phy-node path and errors out with "no phy found" when
the DT has no phy-handle for such interfaces.

Skip the PHY attach when priv->hw->phylink_pcs is already set
and no phy-handle is specified in the device tree, allowing
platform PCS implementations to handle the link autonomously.
Hmpf this bug again...

There have been multiple attempts at solving this, cf this thread :

https://lore.kernel.org/netdev/E1w66jW-0000000E3qS-23fW@rmk-PC.armlinux.org.uk/ (local)

Now, there wasn't any conclusion on that, but I _think_ the proper
solution is to re-apply Russell's original patch (the one in the link above)
and to add this current patch on top of it.

Russell states that this may (will ?) break qcom-ethqos, but OTOH
we're in need for a solution here, and with the pace of PCS-related
work that impacts stmmac, there's going to be a point where we may
need to think about compatibility.

TBF I don't understand the qcom-ethqos issue, maybe Mohd can help
with testing here ?
Sure, I can help test out qcom-ethqos and see if and where it breaks.

We could not arrive at a conclusion the last time because I ran out of
options to try and find a proper solution. So if it still breaks, I will
spend some time and brainstorm qcom-ethqos's interaction with the
integrated PCS, again.
Thanks :) Good to know you're here to test !

Zxyan Zhu, I think you can send a V2 Series with this current patch, as well as
this patch from Russell :

https://lore.kernel.org/netdev/E1w66jW-0000000E3qS-23fW@rmk-PC.armlinux.org.uk/ (local)

The combination of the two work on dwmac-socfpga, and it would be great to test
that on other stmmac variants

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