diff options
| author | David Dueck <davidcdueck@googlemail.com> | 2013-11-05 17:23:02 +0100 | 
|---|---|---|
| committer | Joe Hershberger <joe.hershberger@ni.com> | 2013-11-22 17:03:20 -0600 | 
| commit | 3a530d1b3e947c09e882dda8883aa608458a598c (patch) | |
| tree | db29fa262506e0326a45f87b19bdc89ccb05b963 /drivers | |
| parent | c583ee16cb5db73fc299bb679ecb75a5abb3ca47 (diff) | |
| download | olio-uboot-2014.01-3a530d1b3e947c09e882dda8883aa608458a598c.tar.xz olio-uboot-2014.01-3a530d1b3e947c09e882dda8883aa608458a598c.zip | |
phy: Use supported field during autonegotiation
The current code incorrectly detects gigabit capabilities for some
100Mbit/s phys. (lan8720a)
Signed-off-by: David Dueck <davidcdueck@googlemail.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/phy/phy.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 62925bb28..c691fbbbc 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -275,13 +275,14 @@ int genphy_parse_link(struct phy_device *phydev)  	int mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);  	/* We're using autonegotiation */ -	if (mii_reg & BMSR_ANEGCAPABLE) { +	if (phydev->supported & SUPPORTED_Autoneg) {  		u32 lpa = 0;  		int gblpa = 0;  		u32 estatus = 0;  		/* Check for gigabit capability */ -		if (mii_reg & BMSR_ERCAP) { +		if (phydev->supported & (SUPPORTED_1000baseT_Full | +					SUPPORTED_1000baseT_Half)) {  			/* We want a list of states supported by  			 * both PHYs in the link  			 */ |