]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:24:20 +0000 (14:24 +0200)
commitc9646693ae34a757ee7c98cf13291428b49f11a1
treefce19635870479d8159648c1bc541b49dc7a5f58
parentf3007c6b37b31a0f3e096275fff379e7f2cca0fd
usbnet: smsc95xx: Don't clear read-only PHY interrupt

[ Upstream commit 93307b4f8595c9ffb5d35b60c10d7bd85bbc7ffc ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/smsc95xx.c