]> git.itanic.dy.fi Git - linux-stable/commit
net: phy: smsc: Cache interrupt mask
authorLukas Wunner <lukas@wunner.de>
Thu, 12 May 2022 08:42:06 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 May 2022 10:35:46 +0000 (11:35 +0100)
commit7e8b617eb93f9fcaedac02cd19edcad31c767386
tree08c46b1dd3e5f61e9ee7059b84d1746777707996
parent1ce8b37241ed291af56f7a49bbdbf20c08728e88
net: phy: smsc: Cache interrupt mask

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