Skip to content

Commit 88e8846

Browse files
committed
net: phy: lan87xx: Allow more time for link detect
With EDPWRDOWN set in idle, it must be cleared before checking for ENERGYON going high, indicating that a link is being established. The existing code allows 640ms for ENERGYON to go high, but on Raspberry Pis that appears not to be enough, causing link detection to fail. Increase the polling timeout to 1500ms - with a polling interval of 10ms it shouldn't cause unnecessary delays. See: raspberrypi#4393 Signed-off-by: Phil Elwell <[email protected]>
1 parent a5d2df0 commit 88e8846

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/phy/smsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,12 @@ static int lan87xx_read_status(struct phy_device *phydev)
195195
if (rc < 0)
196196
return rc;
197197

198-
/* Wait max 640 ms to detect energy and the timeout is not
198+
/* Wait max 1500 ms to detect energy and the timeout is not
199199
* an actual error.
200200
*/
201201
read_poll_timeout(phy_read, rc,
202202
rc & MII_LAN83C185_ENERGYON || rc < 0,
203-
10000, 640000, true, phydev,
203+
10000, 1500000, true, phydev,
204204
MII_LAN83C185_CTRL_STATUS);
205205
if (rc < 0)
206206
return rc;

0 commit comments

Comments
 (0)