1
1

realtek: pcs: rtl931x: run set_mode before activate

Move rtpcs_931x_sds_set_mode(sds, hw_mode) ahead of
rtpcs_931x_sds_activate() in rtpcs_931x_setup_serdes(). The IP-block
mode registers latch with the SerDes powered down, so the mode can be
committed during the configure phase rather than after power-on.

This matches the phase order already used by 838x and 930x
(deactivate -> configure -> set_mode -> activate) and is a step toward
a unified bring-up sequence across variants.

Verified on RTL931x hardware: USXGMII, SGMII and 10GBASE-R modes all
come up, link is established, L2 forwarding works, and iperf3 reports
expected throughput.

Link: https://github.com/openwrt/openwrt/pull/23513
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Jonas Jelonek 2026-05-20 18:33:40 +00:00
parent fc0fc86e55
commit 26dc5f0cad
No known key found for this signature in database

View File

@ -3868,14 +3868,13 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_serdes *sds,
return ret;
}
rtpcs_931x_sds_activate(sds);
ret = rtpcs_931x_sds_set_mode(sds, hw_mode);
if (ret < 0)
return ret;
sds->hw_mode = hw_mode;
rtpcs_931x_sds_activate(sds);
return 0;
}