Re: [PATCH v3] crypto: amlogic: Fix IRQ handler return value and fallthrough logic
From: Herbert Xu
Date: Wed Sep 23 2026 - 05:02:23 EST
On Fri, Sep 18, 2026 at 05:29:50PM +0530, Mohamad Raizudeen wrote:
> In meson_irq_handler(), when an interrupt matches a flow but the status
> register is empty, the driver prints an error but doesn't return. It
> falls through the loop and incorrectly prints an `unknown irq` message.
>
> Fix this by returning immediately. For empty status registers, return
> IRQ_NONE instead of IRQ_HANDLED to avoid masking spurious interrupts and
> allow the kernel to detect interrupt storms. Also use
> dev_err_ratelimited() to prevent console lockups during an interrupt
> storm.
>
> Additionally, the handler returned IRQ_HANDLED for genuinely unknown
> interrupts. Return IRQ_NONE instead for unhandled interrupts.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 48fe583fe5417 ("crypto: amlogic - Add crypto accelerator for amlogic GXL")
> Signed-off-by: Mohamad Raizudeen <raizudeen.kerneldev@xxxxxxxxx>
> ---
> I have addressed the IRQ specific issues in this v3. The other
> pre-exisiting issues mentioned by Sashiko are already addressed in my
> separate patch.
>
> Changes in v3:
> - Revert accidental clock management changes that were squashed into v2.
>
> Changes in v2:
> - Return IRQ_NONE instead of IRQ_HANDLED when status register is empty
> to avoid masking spurious interrupts.
> - Use dev_err_ratelimited() to prevent console lockups.
>
> Link to v2: https://lore.kernel.org/all/20260918110504.7207-1-raizudeen.kerneldev@xxxxxxxxx/T/
>
> drivers/crypto/amlogic/amlogic-gxl-core.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt