net: phy: xpcs: Reset XPCS upon probe
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 20 Mar 2020 09:53:35 +0000 (10:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:01:58 +0000 (21:01 -0700)
Reset the XPCS upon probe stage so that we start it from well known
state.

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 c04e9bf401806986f9fcf2b39b8caff52b9b27de..54976047dcb997145ff642e91937866739696a09 100644 (file)
@@ -688,7 +688,7 @@ static int xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface)
                        match = entry;
 
                        if (xpcs_check_features(xpcs, match, interface))
-                               return 0;
+                               return xpcs_soft_reset(xpcs, MDIO_MMD_PCS);
                }
        }