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>
int ret;
if (hw_mode == RTPCS_SDS_MODE_XSGMII)
- return rtpcs_93xx_sds_set_mac_mode(sds, hw_mode);
+ return rtpcs_93xx_sds_set_mac_driven_mode(sds, hw_mode);
ret = rtpcs_931x_sds_apply_ip_mode(sds, hw_mode);
if (ret)