[openwrt/openwrt] realtek: pcs: rtl931x: drop sequence in favor of function

LEDE Commits lede-commits at lists.infradead.org
Sat Feb 7 15:36:03 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0c17d0e8a6caf136ccc9e3c391abde6a7f38fddc

commit 0c17d0e8a6caf136ccc9e3c391abde6a7f38fddc
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Sat Jan 31 18:31:50 2026 +0000

    realtek: pcs: rtl931x: drop sequence in favor of function
    
    Drop a register write sequence from the USXGMII setup for RTL931x in
    favor of using a function that is already present. From the name, the
    function initializes LEQ DFE. Though it's not yet clear what it exactly
    does, this is already better then having a sequence with no explanation
    somewhere in the code.
    
    Apparently, when this code was added, the function wasn't present
    but it's content was just added here as single usage.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/21858
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 13 +------------
 1 file changed, 1 insertion(+), 12 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 a6bc37831e..8b9f1a834e 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
@@ -3580,18 +3580,7 @@ static int rtpcs_931x_sds_config_hw_mode(struct rtpcs_serdes *sds,
 
 			rtpcs_sds_write_bits(sds, 0x6, 0x2, 12, 12, 0);
 		} else {
-			rtpcs_sds_write_bits(sds, 0x2e, 0xd, 6, 0, 0x0);
-			rtpcs_sds_write_bits(sds, 0x2e, 0xd, 7, 7, 0x1);
-
-			rtpcs_sds_write_bits(sds, 0x2e, 0x1c, 5, 0, 0x1E);
-			rtpcs_sds_write_bits(sds, 0x2e, 0x1d, 11, 0, 0x00);
-			rtpcs_sds_write_bits(sds, 0x2e, 0x1f, 11, 0, 0x00);
-			rtpcs_sds_write_bits(sds, 0x2f, 0x0, 11, 0, 0x00);
-			rtpcs_sds_write_bits(sds, 0x2f, 0x1, 11, 0, 0x00);
-
-			rtpcs_sds_write_bits(sds, 0x2e, 0xf, 12, 6, 0x7F);
-			rtpcs_sds_write(sds, 0x2f, 0x12, 0xaaa);
-
+			rtpcs_931x_sds_init_leq_dfe(sds);
 			rtpcs_931x_sds_rx_reset(sds);
 
 			rtpcs_sds_write(sds, 0x7, 0x10, op_code);




More information about the lede-commits mailing list