]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: microchip: fix bridging with more than two member ports
authorSvenning Sørensen <sss@secomea.com>
Fri, 18 Feb 2022 11:27:01 +0000 (11:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 19 Feb 2022 16:22:46 +0000 (16:22 +0000)
commit3d00827a90db6f79abc7cdc553887f89a2e0a184
tree87af792a0ebae19e8f3a9e7f2c79f7b772da1804
parent5486f5bf790b5c664913076c3194b8f916a5c7ad
net: dsa: microchip: fix bridging with more than two member ports

Commit b3612ccdf284 ("net: dsa: microchip: implement multi-bridge support")
plugged a packet leak between ports that were members of different bridges.
Unfortunately, this broke another use case, namely that of more than two
ports that are members of the same bridge.

After that commit, when a port is added to a bridge, hardware bridging
between other member ports of that bridge will be cleared, preventing
packet exchange between them.

Fix by ensuring that the Port VLAN Membership bitmap includes any existing
ports in the bridge, not just the port being added.

Fixes: b3612ccdf284 ("net: dsa: microchip: implement multi-bridge support")
Signed-off-by: Svenning Sørensen <sss@secomea.com>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_common.c