diff options
author | Andre Przywara <andre.przywara@arm.com> | 2020-01-04 01:08:47 +0300 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2020-03-10 02:11:24 +0300 |
commit | a44ee246c570deb9190214d0711057a86b0f6a86 (patch) | |
tree | 097b808b806437c6a4299d8d10586d2a52a281a1 /drivers | |
parent | 21e4ee3c9cbbcd639ebad1bb811788804047096f (diff) | |
download | u-boot-a44ee246c570deb9190214d0711057a86b0f6a86.tar.xz |
net: phy: Fix overlong PHY timeout
Commit 27c3f70f3b50 ("net: phy: Increase link up delay in
genphy_update_link()") increased the per-iteration waiting time from
1ms to 50ms, without adjusting the timeout counter. This lead to the
timeout increasing from the typical 4 seconds to over three minutes.
Adjust the timeout counter evaluation by that factor of 50 to bring the
timeout back to the intended value.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Fixes: net: phy: Increase link up delay in genphy_update_link() ("27c3f70f3b50")
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Matthias Brugger <mbrugger@suse.com>
Tested-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/phy/phy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 359cc49235..505d3ab659 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -244,7 +244,7 @@ int genphy_update_link(struct phy_device *phydev) /* * Timeout reached ? */ - if (i > PHY_ANEG_TIMEOUT) { + if (i > (PHY_ANEG_TIMEOUT / 50)) { printf(" TIMEOUT !\n"); phydev->link = 0; return -ETIMEDOUT; |