From: Jonas Jelonek Date: Wed, 24 Dec 2025 10:36:03 +0000 (+0000) Subject: realtek: pcs: add missing SerDes modes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfd6a4212f30cabe4eb50620391251db0579582c;p=thirdparty%2Fopenwrt.git realtek: pcs: add missing SerDes modes 100Base-X mode was missing before in the enum rtpcs_sds_mode. So add it to be able to support this mode too. Handle this mode in the _determine_hw_mode mapper. 10G_QXGMII mode was missing in the mode mapper. Add it and map it to USXGMII_10GQXGMII mode. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/21365 Signed-off-by: Hauke Mehrtens --- 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 e00e19b1f31..2953c5c5f57 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 @@ -110,6 +110,7 @@ enum rtpcs_sds_mode { RTPCS_SDS_MODE_OFF = 0, /* fiber modes */ + RTPCS_SDS_MODE_100BASEX, RTPCS_SDS_MODE_1000BASEX, RTPCS_SDS_MODE_2500BASEX, RTPCS_SDS_MODE_10GBASER, @@ -286,6 +287,9 @@ static int rtpcs_sds_determine_hw_mode(struct rtpcs_serdes *sds, case PHY_INTERFACE_MODE_NA: *hw_mode = RTPCS_SDS_MODE_OFF; break; + case PHY_INTERFACE_MODE_100BASEX: + *hw_mode = RTPCS_SDS_MODE_100BASEX; + break; case PHY_INTERFACE_MODE_1000BASEX: *hw_mode = RTPCS_SDS_MODE_1000BASEX; break; @@ -305,6 +309,9 @@ static int rtpcs_sds_determine_hw_mode(struct rtpcs_serdes *sds, /* TODO: set this depending on number of links on SerDes */ *hw_mode = RTPCS_SDS_MODE_USXGMII_10GSXGMII; break; + case PHY_INTERFACE_MODE_10G_QXGMII: + *hw_mode = RTPCS_SDS_MODE_USXGMII_10GQXGMII; + break; default: return -ENOTSUPP; }