diff mbox

[U-Boot] net: phy: Set ANRESTART in setup_forced

Message ID 1453490175-15106-1-git-send-email-amessier.tyco@gmail.com
State Accepted
Commit 53b0c38c7a691d13d53c08e4c4ebbfd2612f20a7
Delegated to: Joe Hershberger
Headers show

Commit Message

amessier.tyco@gmail.com Jan. 22, 2016, 7:16 p.m. UTC
From: Alexandre Messier <amessier@tycoint.com>

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>
---
 drivers/net/phy/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger Jan. 22, 2016, 7:26 p.m. UTC | #1
On Fri, Jan 22, 2016 at 1:16 PM,  <amessier.tyco@gmail.com> wrote:
> From: Alexandre Messier <amessier@tycoint.com>
>
> 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>
Joe Hershberger Jan. 29, 2016, 9:27 p.m. UTC | #2
Hi amessier.tyco@gmail.com,

https://patchwork.ozlabs.org/patch/571772/ was applied to u-boot-net.git.

Thanks!
-Joe
diff mbox

Patch

diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a6023f1..1d8eed5 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -116,7 +116,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;