[RFC PATCH 01/10] net: stmmac: move XPCS lifetime management to platform drivers
Coia Prant
coiaprant at gmail.com
Wed Jul 15 14:39:39 PDT 2026
Andrew Lunn <andrew at lunn.ch> 于2026年7月16日周四 03:57写道:
>
> > I actually spent all night debugging call traces caused by the current
> > stmmac PCS lifetime management, and it was not a pleasant experience.
> > The code feels like accumulated technical debt that should be cleaned
> > up.
>
> Russell King will strongly agree with you, if he was around. The
> phylink integration into stmmac causes a lot of pain, and he wanted to
> rip it all out and start again. But doing that without breaking stuff
> is going to be interesting.
>
> If you feel up to it, have a go. But take a good look around first,
> make sure you understand the different variant, internal vs external
> PCS.
>
> Andrew
Hi Andrew,
Thanks for sharing this. It's reassuring to know that I'm not alone in
finding this code painful.
I fully agree that ripping it out and starting over would be a huge
undertaking, and I'm definitely not confident enough to take that on
right now - especially given the risk of breaking existing platforms.
My current focus is on getting this RK3568 SGMII support into a
mergeable state, rather than attempting a full redesign of the
stmmac PCS layer.
That said, I'll keep this in mind. Once my current series lands and I
have a better understanding of the different PCS variants, maybe I'll
be in a better position to contribute to that long-term effort.
For now, I'll stick to the incremental fix that this series provides.
Thanks,
Coia
More information about the Linux-rockchip
mailing list