Răsfoiți Sursa

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 <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/22609
Signed-off-by: Robert Marko <[email protected]>
Jonas Jelonek 2 săptămâni în urmă
părinte
comite
03002d456a

+ 2 - 5
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;