diff mbox

[U-Boot] AR8035/phy: Enable autonegotiation function for ar8035

Message ID 1397203391-23696-1-git-send-email-X.Xie@freescale.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Xiaobo Xie April 11, 2014, 8:03 a.m. UTC
Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before,
but used "if (phydev->supported & SUPPORTED_Autoneg)" now.
So assign "phydev->supported" to "phydev->drv->features" for ar8035
to enable autonegotiation. Then removed the genphy_config_aneg() function.

Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
---
 drivers/net/phy/atheros.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Tom Rini May 13, 2014, 1:51 a.m. UTC | #1
On Fri, Apr 11, 2014 at 04:03:11PM +0800, Xiaobo Xie wrote:

> Function "genphy_parse_link()" used "if (mii_reg & BMSR_ANEGCAPABLE)" before,
> but used "if (phydev->supported & SUPPORTED_Autoneg)" now.
> So assign "phydev->supported" to "phydev->drv->features" for ar8035
> to enable autonegotiation. Then removed the genphy_config_aneg() function.
> 
> Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index b80980d..7993ec9 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -31,9 +31,7 @@  static int ar8035_config(struct phy_device *phydev)
 	regval = phy_read(phydev, MDIO_DEVAD_NONE, 0x1e);
 	phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, (regval|0x0100));
 
-	genphy_config_aneg(phydev);
-
-	phy_reset(phydev);
+	phydev->supported = phydev->drv->features;
 
 	return 0;
 }