Skip to content

Commit b8b79c4

Browse files
Eldar Gasanovdavem330
authored andcommitted
net: dsa: mv88e6xxx: Fix adding vlan 0
8021q module adds vlan 0 to all interfaces when it starts. When 8021q module is loaded it isn't possible to create bond with mv88e6xxx interfaces, bonding module dipslay error "Couldn't add bond vlan ids", because it tries to add vlan 0 to slave interfaces. There is unexpected behavior in the switch. When a PVID is assigned to a port the switch changes VID to PVID in ingress frames with VID 0 on the port. Expected that the switch doesn't assign PVID to tagged frames with VID 0. But there isn't a way to change this behavior in the switch. Fixes: 57e661a ("net: dsa: mv88e6xxx: Link aggregation support") Signed-off-by: Eldar Gasanov <eldargasanov2@gmail.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c7ff9cf commit b8b79c4

File tree

1 file changed

+3
-3
lines changed
  • drivers/net/dsa/mv88e6xxx

1 file changed

+3
-3
lines changed

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1618,9 +1618,6 @@ static int mv88e6xxx_port_check_hw_vlan(struct dsa_switch *ds, int port,
16181618
struct mv88e6xxx_vtu_entry vlan;
16191619
int i, err;
16201620

1621-
if (!vid)
1622-
return -EOPNOTSUPP;
1623-
16241621
/* DSA and CPU ports have to be members of multiple vlans */
16251622
if (dsa_is_dsa_port(ds, port) || dsa_is_cpu_port(ds, port))
16261623
return 0;
@@ -2109,6 +2106,9 @@ static int mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port,
21092106
u8 member;
21102107
int err;
21112108

2109+
if (!vlan->vid)
2110+
return 0;
2111+
21122112
err = mv88e6xxx_port_vlan_prepare(ds, port, vlan);
21132113
if (err)
21142114
return err;

0 commit comments

Comments
 (0)