net: dsa: Handle non-bridge master change
Subsystems (3)
PATCH 1/1 net: dsa: Handle non-bridge master change
Master change notifications may occur other than when joining or leaving a bridge, for example when being added to or removed from a bond or Open vSwitch. In that case, do nothing instead of asking the switch driver to remove a port from a bridge that it didn't join.
---
Modeled after 'rocker: handle non-bridge master change', after confirming that the condition is seen on dsa interfaces.
net/dsa/slave.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/dsa/slave.c +2 -1
@@ -830,12 +830,13 @@ static bool dsa_slave_dev_check(struct net_device *dev)static int dsa_slave_master_changed (struct net_device *dev) {struct net_device *master =netdev_master_upper_dev_get (dev); +struct dsa_slave_priv *p =netdev_priv (dev);int err =0 ;if (master && master->rtnl_link_ops && !strcmp (master->rtnl_link_ops->kind,"bridge" )) err =dsa_slave_bridge_port_join (dev, master); -else +else if (dsa_port_is_bridged (p)) err =dsa_slave_bridge_port_leave (dev);return err;
Signature · 1 line
2.1.0
Quoted 6 lines · Guenter Roeck
Master change notifications may occur other than when joining or leaving a bridge, for example when being added to or removed from a bond or Open vSwitch. In that case, do nothing instead of asking the switch driver to remove a port from a bridge that it didn't join.
Signed-off-by Guenter Roeck <[email protected]>
Signature · 1 line
Florian
From: Guenter Roeck <[email protected]>
Date: Wed, 25 Mar 2015 08:08:37 -0700
Quoted 6 lines
Master change notifications may occur other than when joining or leaving a bridge, for example when being added to or removed from a bond or Open vSwitch. In that case, do nothing instead of asking the switch driver to remove a port from a bridge that it didn't join.
Signed-off-by Guenter Roeck <[email protected]>
Applied.