]> git.ipfire.org Git - thirdparty/openwrt.git/commit
realtek: pcs: rtl930x: gate WDIG 10G-mode bit on real baud rate 24232/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 14 Jul 2026 13:16:42 +0000 (13:16 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 15 Jul 2026 17:37:01 +0000 (19:37 +0200)
commit0f1019db1d45f578221611d1900653863c60aa48
tree8fa507eeea15bc07e2c786aa40107990d8e6ee6e
parent7f063b1f95d2d1163897a808fa74753df39e1707
realtek: pcs: rtl930x: gate WDIG 10G-mode bit on real baud rate

This bit was set unconditionally for any 10G-capable SerDes regardless
of hw_mode, including SGMII/1000BASEX/2500BASEX running on 10G-capable
silicon. The vendor SDK's dal_longan_construct_mac_default_10gmedia_fiber
gates it on the port's declared protocol class instead, applying it to
PHY-attached XSGMII/USXGMII as well as genuine fiber - the "medium to
fiber" naming doesn't match its actual condition.

Gate on speed == RTPCS_SDS_PLL_SPD_10000 instead, matching the real
10G-class protocol family, and actively clear it for 1G/2.5G modes so a
prior 10G-class configuration doesn't leave it stuck across a runtime
downshift. 0 also matches this register's confirmed hardware reset
default on an unconfigured SerDes.

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