summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Waldekranz <tobias@waldekranz.com>2021-12-09 23:24:24 +0100
committerVladimir Oltean <vladimir.oltean@nxp.com>2022-05-04 15:25:00 +0200
commit86ad484ba961a33bb81118d6c7e5fde7a19fd71e (patch)
tree1c1086f89a79cccfb01d6c738f2e82bce3cb517a
parenta2dc153310444a406e1fcf4bbbaff152549fed8f (diff)
net: dsa: mv88e6xxx: Add tx fwd offload PVT on intermediate devices
In a typical mv88e6xxx switch tree like this: CPU | .----. .--0--. | .--0--. | sw0 | | | sw1 | '-1-2-' | '-1-2-' '---' If sw1p{1,2} are added to a bridge that sw0p1 is not a part of, sw0 still needs to add a crosschip PVT entry for the virtual DSA device assigned to represent the bridge. Fixes: ce5df6894a57 ("net: dsa: mv88e6xxx: map virtual bridges with forwarding offload in the PVT") Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com> Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit e0068620e5e1779b3d5bb5649cd196e1cbf277a9) Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 4589b22f0c40..8c5472cd0a22 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2541,6 +2541,7 @@ static int mv88e6xxx_crosschip_bridge_join(struct dsa_switch *ds,
mv88e6xxx_reg_lock(chip);
err = mv88e6xxx_pvt_map(chip, sw_index, port);
+ err = err ? : mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num);
mv88e6xxx_reg_unlock(chip);
return err;
@@ -2556,7 +2557,8 @@ static void mv88e6xxx_crosschip_bridge_leave(struct dsa_switch *ds,
return;
mv88e6xxx_reg_lock(chip);
- if (mv88e6xxx_pvt_map(chip, sw_index, port))
+ if (mv88e6xxx_pvt_map(chip, sw_index, port) ||
+ mv88e6xxx_map_virtual_bridge_to_pvt(ds, bridge.num))
dev_err(ds->dev, "failed to remap cross-chip Port VLAN\n");
mv88e6xxx_reg_unlock(chip);
}