Skip to content

Commit bcf8ed7

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 dff5667 commit bcf8ed7

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
@@ -1181,6 +1181,9 @@ static int lan78xx_link_reset(struct lan78xx_net *dev)
11811181
if (unlikely(ret < 0))
11821182
return -EIO;
11831183

1184+
/* Acknowledge any pending PHY interrupt, lest it be the last */
1185+
phy_read(phydev, LAN88XX_INT_STS);
1186+
11841187
phy_read_status(phydev);
11851188

11861189
if (!phydev->link && dev->link_on) {

0 commit comments

Comments
 (0)