]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: rtl931x: release IP mode force-lock for XSGMII
authorJonas Jelonek <jelonek.jonas@gmail.com>
Thu, 4 Jun 2026 22:32:07 +0000 (22:32 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sat, 6 Jun 2026 07:54:58 +0000 (09:54 +0200)
commit3750c83341b1d54c2b84c248ede0072750daff98
treeb66bd63d60c2f1ac77f998f5c0e01721270cf902
parent28e6a5e2808158d4e84d38d1616c6a6b3c29ed61
realtek: pcs: rtl931x: release IP mode force-lock for XSGMII

rtpcs_931x_sds_deactivate() forces the SerDes IP mode register to OFF
(force-bit set, mode OFF) via apply_ip_mode(OFF). For IP-driven modes a
subsequent bring-up re-asserts the force-bit with the target mode, so the
lock is released. XSGMII, however, is MAC-driven: rtpcs_931x_sds_set_mode
only wrote the MAC mode and never released the IP force-lock, leaving the
IP block pinned OFF. XSGMII therefore only worked when the bootloader had
already configured the SerDes before deactivate ran.

Route the XSGMII branch through rtpcs_93xx_sds_set_mac_driven_mode(),
which unforces the IP mode (page 0x1f reg 0x09 bit 6) before writing the
MAC mode -- the same fix applied to RTL930x in 383c4469e4fd.

Link: https://github.com/openwrt/openwrt/pull/23674
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c