From b447bf56864bc8c9e4693fcb240ae77b3cfacc22 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Thu, 23 Apr 2026 11:28:45 +0000 Subject: [PATCH] realtek: pcs: rtl931x: drop USXGMII gating in setup_serdes The USXGMII_10GDXGMII and USXGMII_10GQXGMII early-return was added when the submode register was not yet programmed, making those modes effectively unconfigurable. With the submode now wired up at probe time and written from the set_mode path, the gating is no longer needed. Keep the XSGMII gate - RTL8218D/E bring-up through the proprietary 10G SGMII path is still unimplemented - and rewrite the surrounding comment accordingly. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/23120 Signed-off-by: Robert Marko --- .../files-6.18/drivers/net/pcs/pcs-rtl-otto.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 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 93b26071ce..7a8020de73 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 @@ -3832,18 +3832,10 @@ static int rtpcs_931x_setup_serdes(struct rtpcs_serdes *sds, int ret; /* - * TODO: USXGMII is currently the swiss army knife to declare 10G - * multi port PHYs. Real devices use other modes instead. Especially - * - * - RTL8224 is driven in 10G_QXGMII - * - RTL8218D/E are driven in (Realtek proprietary) XSGMII (10G SGMII) - * - * For now, disable "USXGMII" modes we cannot configure properly. Only - * USXGMII_10GSXGMII is configured properly for now. + * TODO: XSGMII (Realtek-proprietary 10G SGMII used by RTL8218D/E) + * bring-up is not implemented yet. */ - if (hw_mode == RTPCS_SDS_MODE_USXGMII_10GDXGMII || - hw_mode == RTPCS_SDS_MODE_USXGMII_10GQXGMII || - hw_mode == RTPCS_SDS_MODE_XSGMII) + if (hw_mode == RTPCS_SDS_MODE_XSGMII) return 0; val = rtpcs_sds_read_bits(sds, 0x1F, 0x9, 11, 6);