]> git.itanic.dy.fi Git - linux-stable/commitdiff
usbnet: smsc95xx: Don't clear read-only PHY interrupt
authorLukas Wunner <lukas@wunner.de>
Thu, 12 May 2022 08:42:02 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2022 10:35:46 +0000 (11:35 +0100)
Upon receiving data from the Interrupt Endpoint, the SMSC LAN95xx driver
attempts to clear the signaled interrupts by writing "all ones" to the
Interrupt Status Register.

However the driver only ever enables a single type of interrupt, namely
the PHY Interrupt.  And according to page 119 of the LAN950x datasheet,
its bit in the Interrupt Status Register is read-only.  There's no other
way to clear it than in a separate PHY register:

https://www.microchip.com/content/dam/mchp/documents/UNG/ProductDocuments/DataSheets/LAN950x-Data-Sheet-DS00001875D.pdf

Consequently, writing "all ones" to the Interrupt Status Register is
pointless and can be dropped.

Tested-by: Oleksij Rempel <o.rempel@pengutronix.de> # LAN9514/9512/9500
Tested-by: Ferry Toth <fntoth@gmail.com> # LAN9514
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc95xx.c

index edf0492ad489afc8eda9c6edebffe3233391ba20..2cb44d65bbc3cd21011a6bb16a0be59d545364ae 100644 (file)
@@ -572,10 +572,6 @@ 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_;