]> git.sur5r.net Git - u-boot/commitdiff
net: sun8i_emac: Fix PHY initialization
authorSamuel Holland <samuel@sholland.org>
Sun, 28 Jan 2018 05:53:20 +0000 (23:53 -0600)
committerJagan Teki <jagan@amarulasolutions.com>
Tue, 13 Mar 2018 15:46:51 +0000 (21:16 +0530)
The previous code tried to update the PHY parameters without waiting for
autonegotiation to complete. This caused wrong values to be written to
the EMAC in sun8i_adjust_link(). As a result, any commands that called
eth_start() before autonegotiation completed would find the network
nonfunctional. Fix this by using the correct function to start up the
PHY.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
drivers/net/sun8i_emac.c

index 3ccc6b0bb612de20e6973979c28bb7d981cbc2df..be43472b1aac64c3b625ee9d1fbd2f8a5c9cca30 100644 (file)
@@ -431,7 +431,7 @@ static int _sun8i_emac_eth_init(struct emac_eth_dev *priv, u8 *enetaddr)
        tx_descs_init(priv);
 
        /* PHY Start Up */
-       genphy_parse_link(priv->phydev);
+       phy_startup(priv->phydev);
 
        sun8i_adjust_link(priv, priv->phydev);