]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling
authorMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 16 Nov 2025 15:55:26 +0000 (16:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:43 +0000 (06:12 +0900)
commit9aa2ab65fb66c58ca992fb063698b3f854615ab4
tree1cdb125d1c10127e9c269ac00e0a110ff679f592
parentc646cba915950098c7c31cf431fa351953a22caa
can: sun4i_can: sun4i_can_interrupt(): fix max irq loop handling

commit 76544beea7cfe5bcce6d60f53811657b88ec8be1 upstream.

Reading the interrupt register `SUN4I_REG_INT_ADDR` causes all of its bits
to be reset. If we ever reach the condition of handling more than
`SUN4I_CAN_MAX_IRQ` IRQs, we will have read the register and reset all its
bits but without actually handling the interrupt inside of the loop body.

This may, among other issues, cause us to never `netif_wake_queue()` again
after a transmission interrupt.

Fixes: 0738eff14d81 ("can: Allwinner A10/A20 CAN Controller support - Kernel module")
Cc: stable@vger.kernel.org
Co-developed-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Signed-off-by: Thomas Mühlbacher <tmuehlbacher@posteo.net>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20251116-sun4i-fix-loop-v1-1-3d76d3f81950@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/can/sun4i_can.c