]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: do not leave reserved VLANs
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 5 Feb 2016 19:07:14 +0000 (14:07 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Feb 2016 11:07:48 +0000 (06:07 -0500)
commit2da5d3ba9905ead86a03c1614e1ddee89c275584
tree2a7deba4775bbe55492a52c8da32072e2c9e742c
parent3ede7e9a34035a7a7609db812533254e597eba7d
net: dsa: mv88e6xxx: do not leave reserved VLANs

BRIDGE_VLAN_FILTERING automatically adds a newly bridged port to the
VLAN with the bridge's default_pvid.

The mv88e6xxx driver currently reserves VLANs 4000+ for unbridged ports
isolation. When a port joins a bridge, it leaves its reserved VLAN. When
a port leaves a bridge, it joins again its reserved VLAN.

But if the VLAN filtering is disabled, or if this hardware VLAN is
already in use, the bridged port ends up with no default VLAN, and the
communication with the CPU is thus broken.

To fix this, make a port join its reserved VLAN once on setup, never
leave it, and restore its PVID after another one was eventually used.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c