realtek: pcs: rtl838x: set mode after patching

In order to have a unified SerDes setup sequence, align RTL838x to all
other variants. Set the mode after patching has been applied. Testing on
devices showed the order is rather irrelevant.

Link: https://github.com/openwrt/openwrt/pull/23741
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Jonas Jelonek committed 2026-06-11 20:27:30 +02:00
1 parent f10f423e2b
commit 77ca8616fc
1 file changed
+3 -3
@@ -939,15 +939,15 @@ static int rtpcs_838x_setup_serdes(struct rtpcs_serdes *sds,
rtpcs_sds_write(sds, 0x0, 0x0, 0xc00);
rtpcs_sds_write(sds, 0x0, 0x3, 0x7146);
rtpcs_838x_sds_patch(sds, hw_mode);
rtpcs_838x_sds_reset(sds);
ret = rtpcs_838x_sds_set_mode(sds, hw_mode);
if (ret)
return ret;
sds->hw_mode = hw_mode;
rtpcs_838x_sds_patch(sds, hw_mode);
rtpcs_838x_sds_reset(sds);
/* release reset */
rtpcs_sds_write(sds, 0, 3, 0x7106);