From: Russell King Date: Wed, 24 Jun 2020 11:30:04 +0000 (+0100) Subject: net: phylink: only restart AN if the link mode is using in-band AN X-Git-Tag: v5.9-rc1~133^2~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=575691b309291c5163cca5877ec159120a68774d;p=thirdparty%2Fkernel%2Flinux.git net: phylink: only restart AN if the link mode is using in-band AN If we are not using in-band autonegotiation, there is no point passing the request to restart autonegotiation on to the driver. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index 7cda1646bbf7d..494af91535ba1 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -429,7 +429,8 @@ static void phylink_mac_config_up(struct phylink *pl, static void phylink_mac_pcs_an_restart(struct phylink *pl) { if (pl->link_config.an_enabled && - phy_interface_mode_is_8023z(pl->link_config.interface)) { + phy_interface_mode_is_8023z(pl->link_config.interface) && + phylink_autoneg_inband(pl->cur_link_an_mode)) { if (pl->pcs_ops) pl->pcs_ops->pcs_an_restart(pl->config); else