[PATCH v2 07/10] net: pcs: xpcs: add Rockchip RK3568 platform glue driver
Andrew Lunn
andrew at lunn.ch
Sun Aug 2 12:00:38 PDT 2026
> Hi Andrew,
>
> You're right that the xpcs core uses C45 exclusively, and modern kernels
> no longer require C22 callbacks for mdiobus_register().
>
> However, I'd prefer to keep them for two reasons:
> 1. Debugging tools (mdio-tools, ethtool, etc.) often use C22 reads to
> inspect PHY/PCS registers. Having these callbacks makes debugging
> much easier without having to patch the driver.
> 2. It keeps the driver consistent with pcs-xpcs-plat.c, which also
> provides both C22 and C45 callbacks even though the xpcs core
> only uses C45.
>
> If you strongly prefer removing them to keep the code minimal, I can do
> that in v3. But I think the debug benefit justifies keeping them.
Keep them. I was thinking it side steps the issue of accidentally
mixing up C22 registers and C45 registers. But there are useful use
cases for C22.
Andrew
More information about the linux-phy
mailing list