Skip to contentSkip to conversation

net: sun8i_emac: Fix PHY initialization

PATCH New Samuel Holland 3 participants 3 messages Jan 28, 2018 – Mar 13, 2018

Subsystems (2)
lore
Share & tools
lore

Samuel Holland

author maintainer
#0 lore raw

PATCH 1/1 net: sun8i_emac: Fix PHY initialization

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.

---
 drivers/net/sun8i_emac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/sun8i_emac.c +1 -1
index 3ccc6b0bb6..be43472b1a 100644
@@ -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);
 
Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 net: sun8i_emac: Fix PHY initialization

Quoted 8 lines · Samuel Holland

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.

#2 lore raw

PATCH 1/1 net: sun8i_emac: Fix PHY initialization

Quoted 11 lines · Joe Hershberger
Quoted 8 lines · Samuel Holland

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.

Applied to u-boot-sunxi/master