summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2020-02-11 23:21:16 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2020-04-17 15:28:51 +0100
commitebb5dee33fda88bce37462c841372a4c65651db8 (patch)
treeb5955321a5df6a955a54d2ebdbf5819ae576947d
parente969c67bbe15e1680a5205d54b8c7ff90f6470d7 (diff)
net: phylink: avoid mac_config calls
Avoid calling mac_config() when using split PCS, and the interface remains the same. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
-rw-r--r--drivers/net/phy/phylink.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 4421f283e910..13368e901628 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -619,9 +619,12 @@ static void phylink_resolve(struct work_struct *w)
if (mac_config) {
if (link_state.interface == pl->link_config.interface) {
/* The interface remains unchanged, only the speed,
- * duplex or pause settings have changed.
+ * duplex or pause settings have changed. If we have
+ * PCS ops, then we're programming the MAC using the
+ * mac_link_up() parameters rather than mac_config().
*/
- phylink_mac_config(pl, &link_state);
+ if (!pl->pcs_ops)
+ phylink_mac_config(pl, &link_state);
} else if (cur_link_state) {
/* The interface has changed, but the link is up.
* Force it down and retrigger resolution.