]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: pcs: rtl930x: rename patching function
authorJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 17 Mar 2026 21:29:15 +0000 (21:29 +0000)
committerRobert Marko <robimarko@gmail.com>
Thu, 26 Mar 2026 09:53:45 +0000 (10:53 +0100)
Rename the function that currently "applies patches" so that it covers
everything it does (and will do). It doesn't only apply patches but in
general performs configuration of a SerDes for a particular hardware
mode.

While at it, remove a print above that call because it is both placed
wrong and redundant due to what the generic pcs_config prints.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22582
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c

index 6031eedb3233e77cdb3b4382dc2c85de0f856c1b..0992c25e1b9492c0c8260086c38e485a36c5746a 100644 (file)
@@ -2951,8 +2951,7 @@ static void rtpcs_930x_sds_usxgmii_config(struct rtpcs_serdes *sds, int nway_en,
        rtpcs_sds_write_bits(sds, 0x6, 0x1d, 11, 10, sync_bit);
 }
 
-static int rtpcs_930x_sds_patch(struct rtpcs_serdes *sds,
-                               enum rtpcs_sds_mode hw_mode)
+static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sds_mode hw_mode)
 {
        int (*apply_fn)(struct rtpcs_serdes *, const struct rtpcs_sds_config *, size_t);
        bool is_xsgmii = (hw_mode == RTPCS_SDS_MODE_XSGMII);
@@ -3043,8 +3042,8 @@ static int rtpcs_930x_setup_serdes(struct rtpcs_serdes *sds,
        if (ret < 0)
                return ret;
 
-       /* Apply serdes patches */
-       ret = rtpcs_930x_sds_patch(sds, hw_mode);
+       /* Apply configuration for a hardware mode to SerDes */
+       ret = rtpcs_930x_sds_config_hw_mode(sds, hw_mode);
        if (ret < 0)
                return ret;
 
@@ -3053,9 +3052,6 @@ static int rtpcs_930x_setup_serdes(struct rtpcs_serdes *sds,
        /* dal_longan_construct_serdesConfig_init */ /* Serdes Construct */
        rtpcs_930x_phy_enable_10g_1g(sds);
 
-       /* ----> dal_longan_sds_mode_set */
-       pr_info("%s: Configuring RTL9300 SERDES %d\n", __func__, sds->id);
-
        /* Set SDS polarity */
        rtpcs_930x_sds_set_polarity(sds, sds->tx_pol_inv, sds->rx_pol_inv);