Skip to content

Commit 72aa729

Browse files
pelwellpopcornmix
authored andcommitted
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: #4393 Signed-off-by: Phil Elwell <[email protected]>
1 parent e95c0cc commit 72aa729

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
@@ -228,12 +228,12 @@ static int lan87xx_read_status(struct phy_device *phydev)
228228
if (rc < 0)
229229
return rc;
230230

231-
/* Wait max 640 ms to detect energy and the timeout is not
231+
/* Wait max 1500 ms to detect energy and the timeout is not
232232
* an actual error.
233233
*/
234234
read_poll_timeout(phy_read, rc,
235235
rc & MII_LAN83C185_ENERGYON || rc < 0,
236-
10000, 640000, true, phydev,
236+
10000, 1500000, true, phydev,
237237
MII_LAN83C185_CTRL_STATUS);
238238
if (rc < 0)
239239
return rc;

0 commit comments

Comments
 (0)