]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: smsc: Cope with hot-removal in interrupt handler
authorLukas Wunner <lukas@wunner.de>
Thu, 12 May 2022 08:42:07 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2022 10:35:46 +0000 (11:35 +0100)
commitcb7a099c8ff1618cc6d6f7811b9acddca282bc33
tree71519b28b5b18538fe857eb9d9057b269b16bb19
parent987172269055877913d42f8f0e5df4451c21364e
net: phy: smsc: Cope with hot-removal in interrupt handler

If reading the Interrupt Source Flag register fails with -ENODEV, then
the PHY has been hot-removed and the correct response is to bail out
instead of throwing a WARN splat and attempting to suspend the PHY.
The PHY should be stopped in due course anyway as the kernel
asynchronously tears down the device.

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/phy/smsc.c