From f213e88576d61cc6056f713deffaa0f7d4ced90c Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Tue, 17 Mar 2026 21:29:15 +0000 Subject: [PATCH] realtek: pcs: rtl930x: rename patching function 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 Link: https://github.com/openwrt/openwrt/pull/22582 Signed-off-by: Robert Marko --- .../realtek/files-6.12/drivers/net/pcs/pcs-rtl-otto.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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 6031eedb32..0992c25e1b 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 @@ -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);