mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-26 06:30:39 +00:00
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>
This commit is contained in:
parent
c583ee16cb
commit
3a530d1b3e
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue