From: Jose Abreu Date: Fri, 20 Mar 2020 09:53:37 +0000 (+0100) Subject: net: phy: xpcs: Restart AutoNeg if outcome was invalid X-Git-Tag: block-5.7-2020-04-09~9^2~99^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1874b83a39be5009adb65ed541fa846a8cc99224;p=linux-2.6-block.git net: phy: xpcs: Restart AutoNeg if outcome was invalid Restart AutoNeg if we didn't get a valid result from previous run. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/mdio-xpcs.c b/drivers/net/phy/mdio-xpcs.c index f10d86b85fbd..0d66a8ba7eb6 100644 --- a/drivers/net/phy/mdio-xpcs.c +++ b/drivers/net/phy/mdio-xpcs.c @@ -433,8 +433,10 @@ static int xpcs_aneg_done(struct mdio_xpcs_args *xpcs, return ret; /* Check if Aneg outcome is valid */ - if (!(ret & DW_C73_AN_ADV_SF)) + if (!(ret & DW_C73_AN_ADV_SF)) { + xpcs_config_aneg(xpcs); return 0; + } return 1; }