]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: felix: improve the workaround for multiple native VLANs on NPI port
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 31 Oct 2020 10:29:16 +0000 (12:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 3 Nov 2020 01:09:07 +0000 (17:09 -0800)
commite611670637cd8ca364af92c93f1c01cfd7e81410
tree6d2af69b39fc42949b8099688599c57556b546d8
parente6616db61b8f42dc334d7b7054c8c004634348b6
net: dsa: felix: improve the workaround for multiple native VLANs on NPI port

After the good discussion with Florian from here:
https://lore.kernel.org/netdev/20200911000337.htwr366ng3nc3a7d@skbuf/

I realized that the VLAN settings on the NPI port (the hardware "CPU port",
in DSA parlance) don't actually make any difference, because that port
is hardcoded in hardware to use what mv88e6xxx would call "unmodified"
egress policy for VLANs.

So earlier patch 37b9ff23525f ("net: dsa: felix: send VLANs on CPU port
as egress-tagged") was incorrect in the sense that it didn't actually
make the VLANs be sent on the NPI port as egress-tagged. It only made
ocelot_port_set_native_vlan shut up.

Now that we have moved the check from ocelot_port_set_native_vlan to
ocelot_vlan_prepare, we can simply shunt ocelot_vlan_prepare from DSA,
and avoid calling it. This is the correct way to deal with things,
because the NPI port configuration is DSA-specific, so the ocelot switch
library should not have the check for multiple native VLANs refined in
any way, it is correct the way it is.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/ocelot/felix.c