]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: fix vlan setup
authorRussell King <rmk+kernel@armlinux.org.uk>
Thu, 29 Oct 2020 16:09:03 +0000 (16:09 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Oct 2020 21:31:00 +0000 (14:31 -0700)
commitad76ffab1aa416009b212b3b4ddc7a18c886ff6a
treeb6f1f422ecea99ce9822ef28e21a2c1a2ea0bb33
parenteb7110bc9b84e9f9c55866164e0f6d61c989c809
net: dsa: mv88e6xxx: fix vlan setup

DSA assumes that a bridge which has vlan filtering disabled is not
vlan aware, and ignores all vlan configuration. However, the kernel
software bridge code allows configuration in this state.

This causes the kernel's idea of the bridge vlan state and the
hardware state to disagree, so "bridge vlan show" indicates a correct
configuration but the hardware lacks all configuration. Even worse,
enabling vlan filtering on a DSA bridge immediately blocks all traffic
which, given the output of "bridge vlan show", is very confusing.

Allow the VLAN configuration to be updated on Marvell DSA bridges,
otherwise we end up cutting all traffic when enabling vlan filtering.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Link: https://lore.kernel.org/r/E1kYAU3-00071C-1G@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/mv88e6xxx/chip.c