Skip to content

Commit fbff4db

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 b58833d commit fbff4db

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
@@ -1662,6 +1662,9 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
16621662
if (unlikely(ret < 0))
16631663
return ret;
16641664

1665+
/* Acknowledge any pending PHY interrupt, lest it be the last */
1666+
phy_read(phydev, LAN88XX_INT_STS);
1667+
16651668
mutex_lock(&phydev->lock);
16661669
phy_read_status(phydev);
16671670
link = phydev->link;

0 commit comments

Comments
 (0)