diff options
| author | Daniel Golle <daniel@makrotopia.org> | 2026-05-14 15:04:50 +0100 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-05-19 12:37:29 +0200 |
| commit | 2c4c76cacc9d5553f4c3342eb332d7123a4c3f14 (patch) | |
| tree | 5dbbddcbe4c4573bad81997fd4be06f4c29f6f1a /tools/testing/shared/xarray-shared.c | |
| parent | 3ac85bcfd404b588298c95c6fba8aad4ad334f57 (diff) | |
net: dsa: mt7530: fix CPU port VLAN not being reset to unaware
After a VLAN-aware bridge is destroyed, creating any VLAN-unaware
bridge loses all connectivity. The VID 0 VLAN table entry used by
VLAN-unaware ports in FALLBACK mode gets corrupted during VLAN-aware
operation: mt7530_hw_vlan_add() overwrites its EG_CON flag with
VTAG_EN and bridge teardown removes ports from its PORT_MEM.
The cleanup code that should restore it never runs because the current
port's dp->vlan_filtering flag is still true when checked (DSA updates
it only after the driver callback returns). Even when restored, the
deferred VLAN deletion events from the switchdev workqueue can corrupt
VID 0 again after the restoration.
Skip the current port in the all_user_ports_removed check, call
mt7530_setup_vlan0() to restore the VID 0 entry, and protect VID 0
from being modified by bridge VLAN operations in port_vlan_add and
port_vlan_del since it is managed exclusively by mt7530_setup_vlan0().
Remove the CPU port PCR and PVC register writes which were clobbering
PORT_VLAN mode and VLAN_ATTR with wrong values.
Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Link: https://patch.msgid.link/da8bdaf08b2427a9057e6cb33e26d41f8a8d5000.1778766629.git.daniel@makrotopia.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/testing/shared/xarray-shared.c')
0 files changed, 0 insertions, 0 deletions
