From 1707475f996698a39b0815610f0e4e9f2215819e Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Thu, 5 Mar 2026 22:01:19 +0000 Subject: [PATCH] realtek: pcs: rtl930x: use param instead of register read Instead of performing a dedicated register read we can rely on the mode that is passed via a parameter to the function. The code flow ensures that this is the same value in this place. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/22450 Signed-off-by: Robert Marko --- .../linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c index dfdab61129..2f66d3c472 100644 --- a/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c @@ -2502,8 +2502,8 @@ static void rtpcs_930x_sds_do_rx_calibration(struct rtpcs_serdes *sds, rtpcs_930x_sds_do_rx_calibration_5(sds, hw_mode); mdelay(20); - /* Do this only for 10GR mode, SDS active in mode 0x1a */ - if (rtpcs_sds_read_bits(sds, 0x1f, 9, 11, 7) == RTPCS_930X_SDS_MODE_10GBASER) { + /* Do this only for 10GR mode */ + if (hw_mode == RTPCS_SDS_MODE_10GBASER) { pr_info("%s: SDS enabled\n", __func__); latch_sts = rtpcs_sds_read_bits(sds, 0x4, 1, 2, 2); mdelay(1);