Re: [PATCH v2 07/10] net: pcs: xpcs: add Rockchip RK3568 platform glue driver

Andrew Lunn <[email protected]> Sun, 2 Aug 2026 21:00:38 +0200
Newsgroups org.kernel.vger.linux-renesas-soc,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-phy,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <[email protected]>
> 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