From 03002d456a272fa6caa873b6e0ed3e4ea729f707 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Wed, 25 Mar 2026 18:16:53 +0100 Subject: [PATCH] realtek: pcs: rtl930x: enable USXGMII-QX configuration The RTL8224 driver now puts the PHY into the proper mode, but the SerDes side is still missing. It was deactivated due to a known regression. Thus, allow USXGMII-QX configuration since both sides should be properly configured now. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/22609 Signed-off-by: Robert Marko --- .../realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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 71b634d6785..d7092cfe052 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 @@ -2814,10 +2814,6 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd apply_fn = is_xsgmii ? rtpcs_sds_apply_config_xsg : rtpcs_sds_apply_config; - /* USXGMII-QX broken, rely on bootloader setup */ - if (hw_mode == RTPCS_SDS_MODE_USXGMII_10GQXGMII) - return 0; - if (hw_mode == RTPCS_SDS_MODE_QSGMII) { if (sds->id >= 2) return -ENOTSUPP; @@ -2893,6 +2889,7 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd case RTPCS_SDS_MODE_XSGMII: case RTPCS_SDS_MODE_USXGMII_10GSXGMII: + case RTPCS_SDS_MODE_USXGMII_10GQXGMII: ret = apply_fn(sds, rtpcs_930x_sds_cfg_ana_10g, ARRAY_SIZE(rtpcs_930x_sds_cfg_ana_10g)); if (ret < 0) @@ -2903,7 +2900,7 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd if (ret < 0) return ret; - if (hw_mode == RTPCS_SDS_MODE_USXGMII_10GSXGMII) + if (!is_xsgmii) /* opcode 0x03: standard/generic USXGMII mode */ rtpcs_930x_sds_usxgmii_config(sds, true, 0x03, 0xa4, 0, 1, 0x1); break;