realtek: mdio: rtl838x: re-enable phy control via SoC
authorBjørn Mork <bjorn@mork.no>
Wed, 4 Feb 2026 11:23:24 +0000 (12:23 +0100)
committerRobert Marko <robimarko@gmail.com>
Thu, 5 Feb 2026 10:38:13 +0000 (11:38 +0100)
commit054785b161cd410365c307a44579bfe545e981a1
tree2257b9ec78cde8ce51ab84b0c9474519c8a77d9e
parente94d4f2022e80e6fecc5301447a1d20bc7bd03e8
realtek: mdio: rtl838x: re-enable phy control via SoC

Commit 17f12695d083 ("realtek: mdio: rtl838x: activate combo PHY media detection")
dropped setting bit 15 of the SMI_GLB_CTRL register without any explanation.  This
broke the Netgear GS108Tv3, causing phy patching to fail:

 Firmware loaded. Size 1184, magic: 83808380
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: patch
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:08: package not ready for patch.
 Realtek RTL8218B (internal) 1b000000.switchcore:mdio-controller-mii:0f: probe with driver Realtek RTL8218B (internal) failed with error -5

None of the internal phys was able to detect a link after this error.

Some rtl8380 devices, like the Zyxel GS1900-10HP A1, were not affected by the bug
because their boot loader always sets bit 15. The bug could also be worked around
on affected devices by running "rtk network on" before booting OpenWrt, setting
bit 15 as a side effect.

Cc: Markus Stockhausen <markus.stockhausen@gmx.de>
Cc: Robert Marko <robimarko@gmail.com>
Fixes: 17f12695d083 ("realtek: mdio: rtl838x: activate combo PHY media detection")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/21868
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/mdio/mdio-realtek-otto.c