Skip to content

Commit 4301c7e

Browse files
pelwellpopcornmix
authored andcommitted
net: lan78xx: Ack pending PHY ints when resetting
lan78xx_link_reset explicitly clears the MAC's view of the PHY's IRQ status. In doing so it potentially leaves the PHY with a pending interrupt that will never be acknowledged, at which point no further interrupts will be generated. Avoid the problem by acknowledging any pending PHY interrupt after clearing the MAC's status bit. See: #2937 Signed-off-by: Phil Elwell <[email protected]>
1 parent dff2cde commit 4301c7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,9 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
14351435
if (unlikely(ret < 0))
14361436
return ret;
14371437

1438+
/* Acknowledge any pending PHY interrupt, lest it be the last */
1439+
phy_read(phydev, LAN88XX_INT_STS);
1440+
14381441
mutex_lock(&phydev->lock);
14391442
phy_read_status(phydev);
14401443
link = phydev->link;

0 commit comments

Comments
 (0)