Skip to content

Commit ccc2f5a

Browse files
LorenzoBianconikuba-moo
authored andcommitted
net: dsa: mt7530: Fix traffic flooding for MMIO devices
On MMIO devices (e.g. MT7988 or EN7581) unicast traffic received on lanX port is flooded on all other user ports if the DSA switch is configured without VLAN support since PORT_MATRIX in PCR regs contains all user ports. Similar to MDIO devices (e.g. MT7530 and MT7531) fix the issue defining default VLAN-ID 0 for MT7530 MMIO devices. Fixes: 110c18b ("net: dsa: mt7530: introduce driver for MT7988 built-in switch") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Reviewed-by: Chester A. Unal <chester.a.unal@arinc9.com> Link: https://patch.msgid.link/20250304-mt7988-flooding-fix-v1-1-905523ae83e9@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3c9231e commit ccc2f5a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/net/dsa/mt7530.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,7 +2591,8 @@ mt7531_setup_common(struct dsa_switch *ds)
25912591
if (ret < 0)
25922592
return ret;
25932593

2594-
return 0;
2594+
/* Setup VLAN ID 0 for VLAN-unaware bridges */
2595+
return mt7530_setup_vlan0(priv);
25952596
}
25962597

25972598
static int
@@ -2687,11 +2688,6 @@ mt7531_setup(struct dsa_switch *ds)
26872688
if (ret)
26882689
return ret;
26892690

2690-
/* Setup VLAN ID 0 for VLAN-unaware bridges */
2691-
ret = mt7530_setup_vlan0(priv);
2692-
if (ret)
2693-
return ret;
2694-
26952691
ds->assisted_learning_on_cpu_port = true;
26962692
ds->mtu_enforcement_ingress = true;
26972693

0 commit comments

Comments
 (0)