Skip to contentSkip to conversation

net: mv88e61xx: fix autonegotiation on ports

PATCH In review Tim Harvey 3 participants 3 messages Feb 4, 2019 – Feb 16, 2019

Subsystems (2)
lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 net: mv88e61xx: fix autonegotiation on ports

phy_reset should be called before autoneg is setup

The only boards using MV88E61XX_SWITCH are:
- alliedtelesis/SBx81LIFKW
- alliedtelesis/SBx81LIFXCAT
- gateworks/gw_ventana

Cc Chris Packham <[email protected]>
---
 drivers/net/phy/mv88e61xx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/phy/mv88e61xx.c +4 -4
index ea54a15310..c1e2860329 100644
@@ -945,14 +945,14 @@ static int mv88e61xx_phy_config(struct phy_device *phydev)
 				continue;
 			}
 
-			res = genphy_config_aneg(phydev);
+			res = phy_reset(phydev);
 			if (res < 0) {
-				printf("Error setting PHY %i autoneg\n", i);
+				printf("Error resetting PHY %i\n", i);
 				continue;
 			}
-			res = phy_reset(phydev);
+			res = genphy_config_aneg(phydev);
 			if (res < 0) {
-				printf("Error resetting PHY %i\n", i);
+				printf("Error setting PHY %i autoneg\n", i);
 				continue;
 			}
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 net: mv88e61xx: fix autonegotiation on ports

Hi Tim,

Quoted 9 lines · Tim Harvey

phy_reset should be called before autoneg is setup

The only boards using MV88E61XX_SWITCH are:
- alliedtelesis/SBx81LIFKW
- alliedtelesis/SBx81LIFXCAT
- gateworks/gw_ventana

Cc Chris Packham <[email protected]>

Makes sense to me

Quoted 28 lines
---
  drivers/net/phy/mv88e61xx.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/phy/mv88e61xx.c +4 -4
index ea54a15310..c1e2860329 100644
@@ -945,14 +945,14 @@ static int mv88e61xx_phy_config(struct phy_device *phydev)
  				continue;
  			}
 
-			res = genphy_config_aneg(phydev);
+			res = phy_reset(phydev);
  			if (res < 0) {
-				printf("Error setting PHY %i autoneg\n", i);
+				printf("Error resetting PHY %i\n", i);
  				continue;
  			}
-			res = phy_reset(phydev);
+			res = genphy_config_aneg(phydev);
  			if (res < 0) {
-				printf("Error resetting PHY %i\n", i);
+				printf("Error setting PHY %i autoneg\n", i);
  				continue;
  			}
 
#2 lore raw
In reply to Tim Harvey
Quoted 8 lines

phy_reset should be called before autoneg is setup The only boards using MV88E61XX_SWITCH are:
- alliedtelesis/SBx81LIFKW
- alliedtelesis/SBx81LIFXCAT
- gateworks/gw_ventana

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================