net: phylink: avoid mac_config calls
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 21 Jul 2020 11:04:10 +0000 (12:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 22:46:50 +0000 (15:46 -0700)
Avoid calling mac_config() when using split PCS, and the interface
remains the same.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c

index f1693ec..424a927 100644 (file)
@@ -631,10 +631,12 @@ static void phylink_resolve(struct work_struct *w)
                        }
                        phylink_pcs_config(pl, false, &link_state);
                        pl->link_config.interface = link_state.interface;
-               } else {
+               } else if (!pl->pcs_ops) {
                        /* The interface remains unchanged, only the speed,
                         * duplex or pause settings have changed. Call the
-                        * old mac_config() method to configure the MAC/PCS.
+                        * old mac_config() method to configure the MAC/PCS
+                        * only if we do not have a PCS installed (an
+                        * unconverted user.)
                         */
                        phylink_mac_config(pl, &link_state);
                }