From 447415b167c5995f12d1f871cea0c94904efe756 Mon Sep 17 00:00:00 2001 From: Jonas Jelonek Date: Mon, 27 Oct 2025 19:13:55 +0000 Subject: [PATCH] realtek: dsa: remove 'RTL93XX SerDes as PHY' leftovers RTL93XX SerDes is entirely managed through the PCS driver and not treated as PHYs anymore. Thus, remove the leftovers from the DSA driver. Signed-off-by: Jonas Jelonek Link: https://github.com/openwrt/openwrt/pull/20577 Signed-off-by: Robert Marko --- .../files-6.12/drivers/net/dsa/rtl83xx/common.c | 16 ++++------------ .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h | 1 - .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h | 7 ------- .../files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 4 ---- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c index 583ece3208..3dceb93e35 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c @@ -399,18 +399,10 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) continue; } - if (priv->id >= 0x9300) { - priv->ports[pn].phy_is_integrated = false; - if (of_property_read_bool(phy_node, "phy-is-integrated")) { - priv->ports[pn].phy_is_integrated = true; - priv->ports[pn].phy = PHY_RTL930X_SDS; - } - } else { - if (of_property_read_bool(phy_node, "phy-is-integrated") && - !of_property_read_bool(phy_node, "sfp")) { - priv->ports[pn].phy = PHY_RTL8218B_INT; - continue; - } + if (of_property_read_bool(phy_node, "phy-is-integrated") && + !of_property_read_bool(phy_node, "sfp")) { + priv->ports[pn].phy = PHY_RTL8218B_INT; + continue; } if (!of_property_read_bool(phy_node, "phy-is-integrated") && diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h index 0b0557bd0c..a361b8e948 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h @@ -620,7 +620,6 @@ enum phy_type { PHY_RTL8218B_EXT = 3, PHY_RTL8214FC = 4, PHY_RTL839X_SDS = 5, - PHY_RTL930X_SDS = 6, }; enum pbvlan_type { diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h index 88aee748c6..43770d60ba 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h @@ -178,15 +178,10 @@ u32 rtl930x_hash(struct rtl838x_switch_priv *priv, u64 seed); irqreturn_t rtldsa_930x_switch_irq(int irq, void *dev_id); irqreturn_t rtl839x_switch_irq(int irq, void *dev_id); void rtl930x_vlan_profile_dump(int index); -int rtl9300_sds_power(int mac, int val); -extern int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode); void rtl930x_print_matrix(void); /* RTL931x-specific */ irqreturn_t rtl931x_switch_irq(int irq, void *dev_id); -int rtl931x_sds_cmu_band_get(int sds, phy_interface_t mode); -int rtl931x_sds_cmu_band_set(int sds, bool enable, u32 band, phy_interface_t mode); -extern void rtl931x_sds_init(u32 sds, phy_interface_t mode); void rtl931x_print_matrix(void); int rtl83xx_lag_add(struct dsa_switch *ds, int group, int port, struct netdev_lag_upper_info *info); @@ -213,6 +208,4 @@ void rtl931x_print_matrix(void); void rtldsa_930x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action); void rtldsa_931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action); -void rtl931x_sw_init(struct rtl838x_switch_priv *priv); - #endif /* _NET_DSA_RTL83XX_H */ diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c index 104fc55d2e..90e450cf96 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c @@ -828,10 +828,6 @@ static int rtl931x_set_ageing_time(unsigned long msec) return 0; } -void rtl931x_sw_init(struct rtl838x_switch_priv *priv) -{ -/* rtl931x_sds_init(priv); */ -} static void rtl931x_pie_lookup_enable(struct rtl838x_switch_priv *priv, int index) { -- 2.30.2