From: Jonas Jelonek Date: Fri, 10 Jul 2026 13:36:19 +0000 (+0000) Subject: realtek: pcs: rtl930x: classify SGMII as PHY-attached media X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4212598948459f7e96aed13b491a7a6ab111e9d2;p=thirdparty%2Fopenwrt.git realtek: pcs: rtl930x: classify SGMII as PHY-attached media SGMII always terminates in a PHY, whether on-board or embedded in an SFP copper module, so it belongs with QSGMII/XSGMII/USXGMII rather than the direct fiber/DAC modes. The PHY equalizes on its own far-end receiver in either case, so no media-dependent TX tuning is needed. Link: https://github.com/openwrt/openwrt/pull/24232 Signed-off-by: Jonas Jelonek --- 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 16199f47fb0..201f45a4251 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 @@ -581,13 +581,18 @@ static int rtpcs_sds_select_media(enum rtpcs_sds_mode hw_mode, enum rtpcs_sds_me case RTPCS_SDS_MODE_OFF: *media = RTPCS_SDS_MEDIA_NONE; break; - case RTPCS_SDS_MODE_SGMII: case RTPCS_SDS_MODE_1000BASEX: case RTPCS_SDS_MODE_2500BASEX: case RTPCS_SDS_MODE_10GBASER: *media = RTPCS_SDS_MEDIA_FIBER; break; default: + /* + * SGMII, QSGMII, XSGMII and USXGMII always run into a PHY, be + * it on-board or embedded in an SFP copper module; either way + * the SerDes-to-PHY trace is short and the PHY equalizes for + * itself on the far end. + */ *media = RTPCS_SDS_MEDIA_PCB; break; }