]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Merge branch 'net-phy-realtek-simplify-and-reunify-c22-c45-drivers'
authorJakub Kicinski <kuba@kernel.org>
Sun, 18 Jan 2026 00:12:18 +0000 (16:12 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sun, 18 Jan 2026 00:12:18 +0000 (16:12 -0800)
commitba4550d5d724b693b142812af435b0984fbb9da0
treeed9d36c88f289a23efaebfd4876b9ed516493c1e
parent5ccde4c81e843ab6b3a324c8e2aa96d9b1270a1a
parent650e55f224a575cdb18c984b95036109519502d1
Merge branch 'net-phy-realtek-simplify-and-reunify-c22-c45-drivers'

Daniel Golle says:

====================
net: phy: realtek: simplify and reunify C22/C45 drivers

The RTL8221B PHY variants (VB-CG and VM-CG) were previously split into
separate C22 and C45 driver instances to support copper SFP modules
using the RollBall MDIO-over-I2C protocol, which only supports Clause-45
access. However, this split created significant code duplication and
complexity.

Commit 8af2136e77989 ("net: phy: realtek: add helper
RTL822X_VND2_C22_REG") exposed that RealTek PHYs map all standard
Clause-22 registers into MDIO_MMD_VEND2 at offset 0xa400.

With commit 1850ec20d6e71 ("net: phy: realtek: use paged access for
MDIO_MMD_VEND2 in C22 mode") it is now possible to access all MMD
registers transparently, regardless of whether the PHY is accessed via
C22 or C45 MDIO.

Further improve the translation logic for this register mapping, so a
single unified driver works efficiently with both access methods,
reducing code duplication.

The series also includes cleanup to remove unnecessary paged operations
on registers that aren't actually affected by page selection.

Testing was done on RTL8211F and RTL8221B-VB-CG (the latter in both
C22 and C45 modes).
====================

Link: https://patch.msgid.link/cover.1768275364.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>