aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/dsa/switch.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2020-06-16 13:31:47 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2020-06-16 13:31:47 +0200
commit4b3c1f1b15f576445c221cbc77a88540433a2ba7 (patch)
treeb88ac114c16fa1747205c9060bf00498bcb5df97 /net/dsa/switch.c
parentdrm/ttm: Fix dma_fence refcnt leak when adding move fence (diff)
parentLinux 5.8-rc1 (diff)
downloadwireguard-linux-4b3c1f1b15f576445c221cbc77a88540433a2ba7.tar.xz
wireguard-linux-4b3c1f1b15f576445c221cbc77a88540433a2ba7.zip
Merge v5.8-rc1 into drm-misc-fixes
Beginning a new release cycles for what will become v5.8. Updating drm-misc-fixes accordingly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to '')
-rw-r--r--net/dsa/switch.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/net/dsa/switch.c b/net/dsa/switch.c
index f3c32ff552b3..86c8dc5c32a0 100644
--- a/net/dsa/switch.c
+++ b/net/dsa/switch.c
@@ -89,11 +89,16 @@ static int dsa_switch_mtu(struct dsa_switch *ds,
static int dsa_switch_bridge_join(struct dsa_switch *ds,
struct dsa_notifier_bridge_info *info)
{
- if (ds->index == info->sw_index && ds->ops->port_bridge_join)
+ struct dsa_switch_tree *dst = ds->dst;
+
+ if (dst->index == info->tree_index && ds->index == info->sw_index &&
+ ds->ops->port_bridge_join)
return ds->ops->port_bridge_join(ds, info->port, info->br);
- if (ds->index != info->sw_index && ds->ops->crosschip_bridge_join)
- return ds->ops->crosschip_bridge_join(ds, info->sw_index,
+ if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
+ ds->ops->crosschip_bridge_join)
+ return ds->ops->crosschip_bridge_join(ds, info->tree_index,
+ info->sw_index,
info->port, info->br);
return 0;
@@ -103,13 +108,17 @@ static int dsa_switch_bridge_leave(struct dsa_switch *ds,
struct dsa_notifier_bridge_info *info)
{
bool unset_vlan_filtering = br_vlan_enabled(info->br);
+ struct dsa_switch_tree *dst = ds->dst;
int err, i;
- if (ds->index == info->sw_index && ds->ops->port_bridge_leave)
+ if (dst->index == info->tree_index && ds->index == info->sw_index &&
+ ds->ops->port_bridge_join)
ds->ops->port_bridge_leave(ds, info->port, info->br);
- if (ds->index != info->sw_index && ds->ops->crosschip_bridge_leave)
- ds->ops->crosschip_bridge_leave(ds, info->sw_index, info->port,
+ if ((dst->index != info->tree_index || ds->index != info->sw_index) &&
+ ds->ops->crosschip_bridge_join)
+ ds->ops->crosschip_bridge_leave(ds, info->tree_index,
+ info->sw_index, info->port,
info->br);
/* If the bridge was vlan_filtering, the bridge core doesn't trigger an