summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-01-28 12:55:52 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2020-06-28 13:52:10 +0100
commit057c44241e20445796cd3bcb03c55d0aa638cb8e (patch)
tree4da8894a84a9faff82525983028ce022a4bffb53
parentf3ef30dcbf997778aebb2bb9894524c8bd2524bd (diff)
net: phylink: update PCS when changing interface during resolution
The only PHYs that are used with phylink which change their interface are the BCM84881 and MV88X3310 family, both of which only change their interface modes on link-up events. This will break when drivers are converted to split-PCS. Fix this. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/phy/phylink.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 8e10e5512553..47323d13bb1f 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -629,8 +629,15 @@ static void phylink_resolve(struct work_struct *w)
phylink_link_down(pl);
cur_link_state = false;
}
+ phylink_pcs_config(pl, false, &link_state);
+ pl->link_config.interface = link_state.interface;
+ } else {
+ /* The interface remains unchanged, only the speed,
+ * duplex or pause settings have changed. Call the
+ * old mac_config() method to configure the MAC/PCS.
+ */
+ phylink_mac_config(pl, &link_state);
}
- phylink_mac_config(pl, &link_state);
}
if (link_state.link != cur_link_state) {