]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: phy: xpcs: Restart AutoNeg if outcome was invalid
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 20 Mar 2020 09:53:37 +0000 (10:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:01:58 +0000 (21:01 -0700)
Restart AutoNeg if we didn't get a valid result from previous run.

Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-xpcs.c

index f10d86b85fbda8a703ba4265ebd89540a6b9bc71..0d66a8ba7eb65d35c212df37ccf84dd448734381 100644 (file)
@@ -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;
        }