diff options
| author | David S. Miller <davem@davemloft.net> | 2021-03-24 12:14:08 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2021-03-24 12:14:08 -0700 |
| commit | bb11d9ac9d465cd18d3dc3ac09bb4b9ab9ddf3bd (patch) | |
| tree | 5c547e0145e518519a4942573d89772888fa83e7 /net | |
| parent | 45b85e47cdd79740b858593f040431f66bf0f032 (diff) | |
| parent | 5b7c0c32c90494f5aaf13f417cff5dc204575597 (diff) | |
| download | linux-bb11d9ac9d465cd18d3dc3ac09bb4b9ab9ddf3bd.tar.gz linux-bb11d9ac9d465cd18d3dc3ac09bb4b9ab9ddf3bd.tar.bz2 linux-bb11d9ac9d465cd18d3dc3ac09bb4b9ab9ddf3bd.zip | |
Merge branch 'bridge-mrp-next'
Horatiu Vultur says:
====================
bridge: mrp: Disable roles before deleting
The first patch in this series make sures that the driver is notified
that the role is disabled before the MRP instance is deleted. The
second patch uses this so it can simplify the driver.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/bridge/br_mrp.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bridge/br_mrp.c b/net/bridge/br_mrp.c index 12487f6fe9b4..cd2b1e424e54 100644 --- a/net/bridge/br_mrp.c +++ b/net/bridge/br_mrp.c @@ -411,6 +411,13 @@ static void br_mrp_del_impl(struct net_bridge *br, struct br_mrp *mrp) cancel_delayed_work_sync(&mrp->in_test_work); br_mrp_switchdev_send_in_test(br, mrp, 0, 0, 0); + /* Disable the roles */ + br_mrp_switchdev_set_ring_role(br, mrp, BR_MRP_RING_ROLE_DISABLED); + p = rtnl_dereference(mrp->i_port); + if (p) + br_mrp_switchdev_set_in_role(br, mrp, mrp->in_id, mrp->ring_id, + BR_MRP_IN_ROLE_DISABLED); + br_mrp_switchdev_del(br, mrp); /* Reset the ports */ |
