]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: realtek: use paged access for MDIO_MMD_VEND2 in C22 mode
authorDaniel Golle <daniel@makrotopia.org>
Mon, 5 Jan 2026 16:38:59 +0000 (16:38 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 8 Jan 2026 12:18:26 +0000 (13:18 +0100)
commit1850ec20d6e71218c02329e5975591075dc972d3
treef1600bea92d34425703383bb75d6ababe103863d
parent65de36f5eae1c540115bf8f705f853718e9b6451
net: phy: realtek: use paged access for MDIO_MMD_VEND2 in C22 mode

RTL822x cannot access MDIO_MMD_VEND2 via MII_MMD_CTRL/MII_MMD_DATA. A
mapping to use paged access needs to be used instead. All other MMD
devices can be accessed as usual.

Implement phy_read_mmd and phy_write_mmd using paged access for
MDIO_MMD_VEND2 in Clause-22 mode instead of relying on
MII_MMD_CTRL/MII_MMD_DATA. This allows eg. rtl822x_config_aneg to work
as expected in case the MDIO bus doesn't support Clause-45 access.

Suggested-by: Bevan Weiss <bevan.weiss@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/25aab7f02dac7c6022171455523e3db1435b0881.1767630451.git.daniel@makrotopia.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/realtek/realtek_main.c