Skip to content

Commit 173c0b7

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 1a06b3d commit 173c0b7

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

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

0 commit comments

Comments
 (0)