Skip to contentSkip to conversation

ar8031/8033/phy:enable autonegotiation for ar8031/8033

PATCH New Zhao Qiang 3 participants 4 messages Dec 23, 2013 – Feb 25, 2014

Subsystems (2)
lore
Share & tools
lore

Zhao Qiang

author
#0 lore raw

PATCH 1/1 ar8031/8033/phy:enable autonegotiation for ar8031/8033

Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before while "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8031/8033 to enable autonegotiation.

---
 drivers/net/phy/atheros.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/atheros.c +1 -0
index b20b4df..1ee2226 100644
@@ -13,6 +13,7 @@ static int ar8021_config(struct phy_device *phydev)
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
 
+	phydev->supported = phydev->drv->features;
 	return 0;
 }
 
Signature · 1 line
1.8.4
#1 lore raw

PATCH 1/1 ar8031/8033/phy:enable autonegotiation for ar8031/8033

Quoted 16 lines · Zhao Qiang

Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before while "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8031/8033 to enable autonegotiation.

---
 drivers/net/phy/atheros.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/atheros.c +0 -0
index b20b4df..1ee2226 100644

drivers/net/phy/atheros.c static int ar8021_config(struct phy_device *phydev) · line 19

Quoted 7 lines
drivers/net/phy/atheros.c +1 -0
@@ -13,6 +13,7 @@ static int ar8021_config(struct phy_device *phydev)
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
 
+	phydev->supported = phydev->drv->features;
 	return 0;
 }
 

Joe,

This patch has been floating for a while. If it is OK, I'd like to take it in with other 85xx patches.

York

#2 lore raw

PATCH 1/1 ar8031/8033/phy:enable autonegotiation for ar8031/8033

Quoted 28 lines · York Sun
Quoted 1 line · Zhao Qiang

Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)"

before

Quoted 15 lines

while "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8031/8033 to enable autonegotiation.

---
 drivers/net/phy/atheros.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/phy/atheros.c +0 -0
index b20b4df..1ee2226 100644

drivers/net/phy/atheros.c static int ar8021_config(struct phy_device *phydev) · line 19

Quoted 7 lines
drivers/net/phy/atheros.c +1 -0
@@ -13,6 +13,7 @@ static int ar8021_config(struct phy_device *phydev)
      phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
      phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47);
 
+     phydev->supported = phydev->drv->features;
      return 0;
 }
 

Joe,

Quoted 5 lines

This patch has been floating for a while. If it is OK, I'd like to take it in
with other 85xx patches.

Sorry for the delayed response... This change seems fine.

-Joe

#3 lore raw

PATCH 1/1 ar8031/8033/phy:enable autonegotiation for ar8031/8033

In reply to Zhao Qiang
Quoted 7 lines · Zhao Qiang

Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before while "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8031/8033 to enable autonegotiation.

---

Applied to u-boot-mpc85xx/master. Thanks.

York