net: phy: smsc: Cache interrupt mask
authorLukas Wunner <lukas@wunner.de>
Thu, 12 May 2022 08:42:06 +0000 (10:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:48:56 +0000 (08:48 +0100)
commitd83813f724ec6e9ee81c9f0455c9d0291cbe8da5
treef4bc35b45885c61a308b07ffd0b9443da3fa54a4
parent18ab31b8cd37502a6f35c1e2c4a2d58be97634cf
net: phy: smsc: Cache interrupt mask

[ Upstream commit 7e8b617eb93f9fcaedac02cd19edcad31c767386 ]

Cache the interrupt mask to avoid re-reading it from the PHY upon every
interrupt.

This will simplify a subsequent commit which detects hot-removal in the
interrupt handler and bails out.

Analyzing and debugging PHY transactions also becomes simpler if such
redundant reads are avoided.

Last not least, interrupt overhead and latency is slightly improved.

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>
Stable-dep-of: 58aac3a2ef41 ("net: phy: smsc: fix link up detection in forced irq mode")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/smsc.c