aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/dsa/mv88e6xxx
diff options
context:
space:
mode:
authorGravatar Andrew Lunn <andrew@lunn.ch> 2017-09-25 23:32:20 +0200
committerGravatar David S. Miller <davem@davemloft.net> 2017-09-28 09:45:06 -0700
commitdb06ae41945b14feb7f696dcafe8048cc37e8a20 (patch)
treeb2e8be02a049436d01b1a7c5119931ba9a8eb6a6 /drivers/net/dsa/mv88e6xxx
parentinetpeer: fix RCU lookup() again (diff)
downloadlinux-db06ae41945b14feb7f696dcafe8048cc37e8a20.tar.gz
linux-db06ae41945b14feb7f696dcafe8048cc37e8a20.tar.bz2
linux-db06ae41945b14feb7f696dcafe8048cc37e8a20.zip
net: dsa: mv88e6xxx: Allow dsa and cpu ports in multiple vlans
Ports with the same VLAN must all be in the same bridge. However the CPU and DSA ports need to be in multiple VLANs spread over multiple bridges. So exclude them when performing this test. Fixes: b2f81d304cee ("net: dsa: add CPU and DSA ports as VLAN members") Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx')
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index c6678aa9b4ef..674dab71d71c 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -1100,6 +1100,10 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
};
int i, err;
+ /* DSA and CPU ports have to be members of multiple vlans */
+ if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
+ return 0;
+
if (!vid_begin)
return -EOPNOTSUPP;