]> git.baikalelectronics.ru Git - kernel.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)
commitd323a274a4f0331fed493abede7667f7f6d39540
tree87af792a0ebae19e8f3a9e7f2c79f7b772da1804
parent3d70d44f804d84ee1cad7596701ce94f80e8adad
net: dsa: microchip: fix bridging with more than two member ports

Commit ae0f85a22d68 ("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: ae0f85a22d68 ("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