Subject: Re: [PATCH net-next v2 00/14] net: stmmac: SerDes, PCS, BASE-X, and inband goodies

From: "Russell King (Oracle)" <[email-masked]>
Date: Thu, 29 Jan 2026 22:00:36 +0000

On Thu, Jan 29, 2026 at 12:57:05PM +0530, Mohd Ayaan Anwar wrote:
> I was thinking about the "good" sequence (i.e., the current net-next
> tree):
> 	-> phylink_up
> 	  -> mac_link_up
> 	    -> fix_mac_speed
> 	      -> SerDes configured via phy_set_speed
> 	      -> stmmac_pcs_ctrl_ane(priv, enable/disable, 0)
> 
> Please let me know if you want me to try any other experiments.
> Maybe I need to do some more testing after playing around with the
> sequence followed by this series?

Given discussion elsewhere, it seems that the generic PHY maintainers
have come to the conclusion (at my request) that the documentation is
incorrect and needs to be changed:

	Order of API calls
	==================

	The general order of calls should be::

	    [devm_][of_]phy_get()
	    phy_init()
	    phy_power_on()
	    [phy_set_mode[_ext]()]
	    ...
	    phy_power_off()
	    phy_exit()
	    [[of_]phy_put()]

Essentially, most users of generic PHY do not follow this, but call
phy_set_mode[_ext]() before phy_power_on().

This will have implications for this patch series, particularly the
serdes related changes, and will make the update to qcom-sgmii-eth
more complex (as its current phy_power_on() implementation does
very little and isn't the reverse of phy_power_off().)

In the mean time, please test patch 2 to see whether that can be
merged.

I'm going to re-order some of the patches in this series to see what
else can be merged without depending on that and without affecting
dwmac-qcom-ethqos, and thus shrinking this series.

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