]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: Set ANRESTART in setup_forced
authorAlexandre Messier <amessier@tycoint.com>
Fri, 22 Jan 2016 19:16:15 +0000 (14:16 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 28 Jan 2016 19:20:28 +0000 (13:20 -0600)
When configuring a PHY in fixed (forced) link mode, in order for
the changes to be applied, either one of these conditions must
be triggered:
1- PHY is reset
2- Autoneg is restarted
3- PHY transitions from power-down to power-up

Neither of these is currently done, so effectively the fixed link
configuration is not applied in the PHY.

Fix this by setting the Autoneg restart bit.

Signed-off-by: Alexandre Messier <amessier@tycoint.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/phy/phy.c

index e25d4e337d5ca0859fb3c63ad4aaccb16a4ff388..a06115d9f832f5496d509c92c1b7374de7a34297 100644 (file)
@@ -128,7 +128,7 @@ static int genphy_config_advert(struct phy_device *phydev)
 static int genphy_setup_forced(struct phy_device *phydev)
 {
        int err;
-       int ctl = 0;
+       int ctl = BMCR_ANRESTART;
 
        phydev->pause = phydev->asym_pause = 0;