Revert "usbnet: smsc95xx: Don't clear read-only PHY interrupt"
authorPhil Elwell <phil@raspberrypi.com>
Fri, 26 Aug 2022 09:13:27 +0000 (10:13 +0100)
committerPhil Elwell <phil@raspberrypi.com>
Fri, 26 Aug 2022 09:13:27 +0000 (10:13 +0100)
This reverts commit 04887243887630f2478a330730d13d87a079b6c8.

See: https://github.com/raspberrypi/linux/issues/5145

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/net/usb/smsc95xx.c

index 220026c..64ad4f1 100644 (file)
@@ -583,6 +583,10 @@ static int smsc95xx_link_reset(struct usbnet *dev)
        unsigned long flags;
        int ret;
 
+       ret = smsc95xx_write_reg(dev, INT_STS, INT_STS_CLEAR_ALL_);
+       if (ret < 0)
+               return ret;
+
        spin_lock_irqsave(&pdata->mac_cr_lock, flags);
        if (pdata->phydev->duplex != DUPLEX_FULL) {
                pdata->mac_cr &= ~MAC_CR_FDPX_;