]> 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)
commit65bbff0d7f611b7e8f60d508ce61ffa96305abab
tree87af792a0ebae19e8f3a9e7f2c79f7b772da1804
parent07b7fc8cff7ba87933ae27d54967ec8e2519527d
net: dsa: microchip: fix bridging with more than two member ports

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