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 ecea1601d85..876ae4fd9b4 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 @@ -320,10 +320,10 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv) snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d", bus->name, dev->id); bus->parent = dev; - priv->ds->slave_mii_bus = bus; - priv->ds->slave_mii_bus->priv = priv; + priv->ds->user_mii_bus = bus; + priv->ds->user_mii_bus->priv = priv; - ret = mdiobus_register(priv->ds->slave_mii_bus); + ret = mdiobus_register(priv->ds->user_mii_bus); if (ret && mii_np) { of_node_put(dn); return ret; @@ -736,7 +736,7 @@ static int rtl83xx_handle_changeupper(struct rtl838x_switch_priv *priv, break; } for (j = 0; j < priv->cpu_port; j++) { - if (priv->ports[j].dp->slave == ndev) + if (priv->ports[j].dp->user == ndev) break; } if (j >= priv->cpu_port) { @@ -771,23 +771,22 @@ out: return 0; } -/* Is the lower network device a DSA slave network device of our RTL930X-switch? - * Unfortunately we cannot just follow dev->dsa_prt as this is only set for the - * DSA master device. - */ int rtl83xx_port_is_under(const struct net_device * dev, struct rtl838x_switch_priv *priv) { -/* TODO: On 5.12: - * if(!dsa_slave_dev_check(dev)) { - * netdev_info(dev, "%s: not a DSA device.\n", __func__); - * return -EINVAL; - * } - */ + /* Is the lower network device a DSA user network device of our RTL930X-switch? + * Unfortunately we cannot just follow dev->dsa_prt as this is only set for the + * DSA conduit device. TODO: since 6.12: + * + * if(!dsa_user_dev_check(dev)) { + * netdev_info(dev, "%s: not a DSA device.\n", __func__); + * return -EINVAL; + * } + */ for (int i = 0; i < priv->cpu_port; i++) { if (!priv->ports[i].dp) continue; - if (priv->ports[i].dp->slave == dev) + if (priv->ports[i].dp->user == dev) return i; } diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c index 29905964c46..f2fe0868212 100644 --- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c @@ -1726,7 +1726,7 @@ static void rtl839x_setup_port_macs(struct rtl838x_switch_priv *priv) u64 mac; pr_debug("%s: got port %08x\n", __func__, (u32)priv->ports[priv->cpu_port].dp); - dev = priv->ports[priv->cpu_port].dp->slave; + dev = priv->ports[priv->cpu_port].dp->user; mac = ether_addr_to_u64(dev->dev_addr); for (int i = 0; i < 15; i++) { diff --git a/target/linux/realtek/patches-6.12/700-dsa-mdio-increase-max-ports-for-rtl839x-rtl931x.patch b/target/linux/realtek/patches-6.12/700-dsa-mdio-increase-max-ports-for-rtl839x-rtl931x.patch index 147e2c587b4..3db46a22853 100644 --- a/target/linux/realtek/patches-6.12/700-dsa-mdio-increase-max-ports-for-rtl839x-rtl931x.patch +++ b/target/linux/realtek/patches-6.12/700-dsa-mdio-increase-max-ports-for-rtl839x-rtl931x.patch @@ -24,7 +24,7 @@ Signed-off-by: Markus Stockhausen --- a/drivers/net/mdio/fwnode_mdio.c +++ b/drivers/net/mdio/fwnode_mdio.c -@@ -87,7 +87,7 @@ int fwnode_mdiobus_phy_device_register(s +@@ -89,7 +89,7 @@ int fwnode_mdiobus_phy_device_register(s } if (fwnode_property_read_bool(child, "broken-turn-around")) @@ -35,7 +35,7 @@ Signed-off-by: Markus Stockhausen &phy->mdio.reset_assert_delay); --- a/include/linux/phy.h +++ b/include/linux/phy.h -@@ -294,7 +294,7 @@ static inline const char *phy_modes(phy_ +@@ -301,7 +301,7 @@ static inline const char *phy_modes(phy_ #define PHY_INIT_TIMEOUT 100000 #define PHY_FORCE_TIMEOUT 10 @@ -44,7 +44,7 @@ Signed-off-by: Markus Stockhausen /* Used when trying to connect to a specific phy (mii bus id:phy device id) */ #define PHY_ID_FMT "%s:%02x" -@@ -414,10 +414,10 @@ struct mii_bus { +@@ -421,10 +421,10 @@ struct mii_bus { struct mdio_device *mdio_map[PHY_MAX_ADDR]; /** @phy_mask: PHY addresses to be ignored when probing */ @@ -70,16 +70,16 @@ Signed-off-by: Markus Stockhausen struct dsa_chip_data { --- a/include/net/dsa.h +++ b/include/net/dsa.h -@@ -465,7 +465,7 @@ struct dsa_switch { +@@ -473,7 +473,7 @@ struct dsa_switch { /* - * Slave mii_bus and devices for the individual ports. + * User mii_bus and devices for the individual ports. */ - u32 phys_mii_mask; + u64 phys_mii_mask; - struct mii_bus *slave_mii_bus; + struct mii_bus *user_mii_bus; /* Ageing Time limits in msecs */ -@@ -597,24 +597,24 @@ static inline bool dsa_is_user_port(stru +@@ -609,24 +609,24 @@ static inline bool dsa_is_user_port(stru dsa_switch_for_each_port_continue_reverse((_dp), (_ds)) \ if (dsa_port_is_cpu((_dp))) @@ -110,9 +110,9 @@ Signed-off-by: Markus Stockhausen return mask; } ---- a/net/dsa/slave.c -+++ b/net/dsa/slave.c -@@ -320,7 +320,7 @@ static int dsa_slave_phy_read(struct mii +--- a/net/dsa/user.c ++++ b/net/dsa/user.c +@@ -320,7 +320,7 @@ static int dsa_user_phy_read(struct mii_ { struct dsa_switch *ds = bus->priv; @@ -121,7 +121,7 @@ Signed-off-by: Markus Stockhausen return ds->ops->phy_read(ds, addr, reg); return 0xffff; -@@ -330,7 +330,7 @@ static int dsa_slave_phy_write(struct mi +@@ -330,7 +330,7 @@ static int dsa_user_phy_write(struct mii { struct dsa_switch *ds = bus->priv; diff --git a/target/linux/realtek/patches-6.12/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch b/target/linux/realtek/patches-6.12/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch index 348c59092aa..8f02f03b510 100644 --- a/target/linux/realtek/patches-6.12/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch +++ b/target/linux/realtek/patches-6.12/722-net-dsa-add-rtl838x-support-for-tag-trailer.patch @@ -56,6 +56,6 @@ Submitted-by: John Crispin source_port = trailer[1] & 7; - +#endif - skb->dev = dsa_master_find_slave(dev, 0, source_port); + skb->dev = dsa_conduit_find_user(dev, 0, source_port); if (!skb->dev) return NULL;