diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-03-06 09:22:18 -0500 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-03-06 09:22:18 -0500 |
commit | cd7d3a1bb42e0756b17ccfafbd956ca7ed757846 (patch) | |
tree | fb76fd0ccaaaa3f27ef0a06ecf3d04ebe9d4025d /net/dsa/port.c | |
parent | 6b5c029df5e40704a6642e026e709dd0dec44622 (diff) | |
parent | 4b057e73f28f1df13b77b77a52094238ffdf8abd (diff) | |
download | linux-cd7d3a1bb42e0756b17ccfafbd956ca7ed757846.tar.bz2 |
Merge drm/drm-next into drm-misc-next
Picking up v5.0 + missed misc-fixes from last release
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'net/dsa/port.c')
-rw-r--r-- | net/dsa/port.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/dsa/port.c b/net/dsa/port.c index 2d7e01b23572..c2261697ee83 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -69,7 +69,6 @@ static void dsa_port_set_state_now(struct dsa_port *dp, u8 state) int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy) { - u8 stp_state = dp->bridge_dev ? BR_STATE_BLOCKING : BR_STATE_FORWARDING; struct dsa_switch *ds = dp->ds; int port = dp->index; int err; @@ -80,7 +79,8 @@ int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy) return err; } - dsa_port_set_state_now(dp, stp_state); + if (!dp->bridge_dev) + dsa_port_set_state_now(dp, BR_STATE_FORWARDING); return 0; } @@ -90,7 +90,8 @@ void dsa_port_disable(struct dsa_port *dp, struct phy_device *phy) struct dsa_switch *ds = dp->ds; int port = dp->index; - dsa_port_set_state_now(dp, BR_STATE_DISABLED); + if (!dp->bridge_dev) + dsa_port_set_state_now(dp, BR_STATE_DISABLED); if (ds->ops->port_disable) ds->ops->port_disable(ds, port, phy); @@ -291,6 +292,7 @@ static struct phy_device *dsa_port_get_phy_device(struct dsa_port *dp) return ERR_PTR(-EPROBE_DEFER); } + of_node_put(phy_dn); return phydev; } |