]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: rtl930x: enable USXGMII-QX configuration
authorJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 25 Mar 2026 17:16:53 +0000 (18:16 +0100)
committerRobert Marko <robimarko@gmail.com>
Wed, 8 Apr 2026 16:46:32 +0000 (18:46 +0200)
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 <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22609
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c

index 71b634d6785fc542636a1ae5c6ef676e49e7a901..d7092cfe05232057e03fb09afaba7efe9072a4e9 100644 (file)
@@ -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;