realtek: dsa: Add non-primary LAG ports to port matrix
authorSven Eckelmann <[email protected]>
Sat, 8 Nov 2025 07:29:27 +0000 (08:29 +0100)
committerRobert Marko <[email protected]>
Sat, 15 Nov 2025 10:17:21 +0000 (11:17 +0100)
If ports of a RTL93xx switch are not added to a port matrix then they are
not used for the link aggregation. As result, communication will then just
break on non-primary interfaces.

This can be reproduced in balanced-xor and 802.3ad bandwidth mode.

Signed-off-by: Sven Eckelmann <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/20729
Signed-off-by: Robert Marko <[email protected]>
target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c

index dc3154437744afe0a7cb48f6cbc53aa3bc0c21ad..bfdbbf6db6ea4b9adab5a88a1cbf91a4f4a1ebe0 100644 (file)
@@ -1378,11 +1378,6 @@ static int rtldsa_port_enable(struct dsa_switch *ds, int port, struct phy_device
        /* add port to switch mask of CPU_PORT */
        priv->r->traffic_enable(priv->cpu_port, port);
 
-       if (priv->lag_non_primary & BIT_ULL(port)) {
-               pr_debug("%s: %d is lag slave. ignore\n", __func__, port);
-               return 0;
-       }
-
        /* add all other ports in the same bridge to switch mask of port */
        priv->r->traffic_set(port, priv->ports[port].pm);
 
@@ -1479,9 +1474,6 @@ static void rtldsa_update_port_member(struct rtl838x_switch_priv *priv, int port
                if (!dsa_port_offloads_bridge_dev(other_dp, bridge_dev))
                        continue;
 
-               if (join && priv->lag_non_primary & BIT_ULL(other_port))
-                       continue;
-
                isolated = p->isolated && other_p->isolated;
 
                if (join && !isolated) {
@@ -1508,11 +1500,6 @@ static int rtldsa_port_bridge_join(struct dsa_switch *ds, int port, struct dsa_b
 
        pr_debug("%s %x: %d", __func__, (u32)priv, port);
 
-       if (priv->lag_non_primary & BIT_ULL(port)) {
-               pr_debug("%s: %d is lag slave. ignore\n", __func__, port);
-               return 0;
-       }
-
        /* reset to default flags for new net_bridge_port */
        priv->ports[port].isolated = false;