Browse Source

net: phy: Set ANRESTART in setup_forced

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>
Alexandre Messier 9 years ago
parent
commit
53b0c38c7a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/phy/phy.c

+ 1 - 1
drivers/net/phy/phy.c

@@ -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;