]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: rtl930x: only apply TX config for 10G SerDes
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 13 Jul 2026 12:17:50 +0000 (12:17 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 15 Jul 2026 17:36:59 +0000 (19:36 +0200)
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 <jelonek.jonas@gmail.com>
target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c

index 7f188b2fcd50652f09843fd5a18e2be6b3754929..16199f47fb0d033f681019499e23e741cb1c0533 100644 (file)
@@ -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