From 1874b83a39be5009adb65ed541fa846a8cc99224 Mon Sep 17 00:00:00 2001 From: Jose Abreu Date: Fri, 20 Mar 2020 10:53:37 +0100 Subject: [PATCH] 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 --- drivers/net/phy/mdio-xpcs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.34.1