summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/rocker/rocker.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-07 12:17:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-07 12:17:34 +0300
commitb7a4abb67416aa07cd65446dd39e64525ccfe8e5 (patch)
tree8f5b0f9ffb617622944b5e6368473f91e3efeaa4 /drivers/net/ethernet/rocker/rocker.c
parentd30323f810e4da94eb75cf4bfe5165b9518c64df (diff)
parentf22e6e847115abc3a0e2ad7bb18d243d42275af1 (diff)
downloadlinux-b7a4abb67416aa07cd65446dd39e64525ccfe8e5.tar.xz
Merge 4.0-rc7 into usb-next
We want the fixes in here, and to help resolve merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/rocker/rocker.c')
-rw-r--r--drivers/net/ethernet/rocker/rocker.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/ethernet/rocker/rocker.c b/drivers/net/ethernet/rocker/rocker.c
index 9fb6948e14c6..5cecec282aba 100644
--- a/drivers/net/ethernet/rocker/rocker.c
+++ b/drivers/net/ethernet/rocker/rocker.c
@@ -4468,10 +4468,16 @@ static int rocker_port_master_changed(struct net_device *dev)
struct net_device *master = netdev_master_upper_dev_get(dev);
int err = 0;
+ /* There are currently three cases handled here:
+ * 1. Joining a bridge
+ * 2. Leaving a previously joined bridge
+ * 3. Other, e.g. being added to or removed from a bond or openvswitch,
+ * in which case nothing is done
+ */
if (master && master->rtnl_link_ops &&
!strcmp(master->rtnl_link_ops->kind, "bridge"))
err = rocker_port_bridge_join(rocker_port, master);
- else
+ else if (rocker_port_is_bridged(rocker_port))
err = rocker_port_bridge_leave(rocker_port);
return err;