Patch "usbnet: smsc95xx: Don't clear read-only PHY interrupt" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    usbnet: smsc95xx: Don't clear read-only PHY interrupt

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usbnet-smsc95xx-don-t-clear-read-only-phy-interrupt.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4a8d053acd3acd06d45b12cd8902178fdaf18acc
Author: Lukas Wunner <lukas@xxxxxxxxx>
Date:   Thu May 12 10:42:02 2022 +0200

    usbnet: smsc95xx: Don't clear read-only PHY interrupt
    
    [ Upstream commit 3108871f19221372b251f7da1ac38736928b5b3a ]
    
    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@xxxxxxxxxxxxxx> # LAN9514/9512/9500
    Tested-by: Ferry Toth <fntoth@xxxxxxxxx> # LAN9514
    Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
    Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index edf0492ad489..2cb44d65bbc3 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -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_;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux