From: Jonas Jelonek Date: Sat, 6 Jun 2026 19:17:32 +0000 (+0000) Subject: realtek: pcs: rtl838x: set mode after patching X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77ca8616fced5a19403ef08d64ef39526210ba4e;p=thirdparty%2Fopenwrt.git 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 --- diff --git a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c index e6df4c1a230..b2ce5a124a7 100644 --- a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c @@ -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);