From: Jonas Jelonek Date: Mon, 13 Jul 2026 12:17:50 +0000 (+0000) Subject: realtek: pcs: rtl930x: only apply TX config for 10G SerDes X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf2c9a5d8b061a60a6fc0ba9361785941a56dace;p=thirdparty%2Fopenwrt.git realtek: pcs: rtl930x: only apply TX config for 10G SerDes So far, there was only a misleading and confusing gate to avoid applying the TX config to SerDes which do not need it or where it even breaks some modes. This is achieved by not applying any configuration for QSGMII mode. While this fits the real-world cases we know so far where QSGMII is only used on SerDes 0/1 but never on others, it implicates that this is true too for QSGMII on 10G SerDes. Looking at the SDK, this assumption doesn't hold. To fix this, drop out of config_media in case a non-10G SerDes is delivered. The SDK does the same in various ways, ending up with the config just being applied for SerDes 2 - 9. 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 7f188b2fcd5..16199f47fb0 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 @@ -2994,6 +2994,9 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd static int rtpcs_930x_sds_config_media(struct rtpcs_serdes *sds, enum rtpcs_sds_media media, enum rtpcs_sds_mode hw_mode) { + if (sds->type != RTPCS_SDS_TYPE_10G) + return 0; + /* * dal_longan_construct_mac_default_10gmedia_fiber: set medium to fiber. * TODO: this is unconditional regardless of hw_mode; needs mode-aware