[PATCH 1/2] crypto: amlogic: Fix IRQ handler return value and fallthrough logic

Mohamad Raizudeen raizudeen.kerneldev at gmail.com
Thu Sep 3 19:49:53 PDT 2026


On Fri, Aug 21, 2026 at 08:42:43PM +0530, Mohamad Raizudeen wrote:
> In irqreturn_t_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 IRQ_HANDLED immediately after the error print.
> 
> Additionally, the handler returns IRQ_HANDLED for genuinely unknown
> interrupts. This masks false interrupts and prevents the kernel from
> detecting interrupts. Return IRQ_NONE instead for unhandled
> interrupts.
> 
> Cc: stable at vger.kernel.org
> Fixes: 48fe583fe5417 ("crypto: amlogic - Add crypto accelerator for amlogic GXL")
> Signed-off-by: Mohamad Raizudeen <raizudeen.kerneldev at gmail.com>
> ---
>  drivers/crypto/amlogic/amlogic-gxl-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c
> index 6cb33949915f..302b398405e2 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-core.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c
> @@ -38,11 +38,12 @@ static irqreturn_t meson_irq_handler(int irq, void *data)
>  				return IRQ_HANDLED;
>  			}
>  			dev_err(mc->dev, "%s %d Got irq for flow %d but ctrl is empty\n", __func__, irq, flow);
> +			return IRQ_HANDLED; 
>  		}
>  	}
>  
>  	dev_err(mc->dev, "%s %d from unknown irq\n", __func__, irq);
> -	return IRQ_HANDLED;
> +	return IRQ_NONE;
>  }
>  
>  static struct meson_alg_template mc_algs[] = {
> -- 
> 2.53.0
>
Hi,

Just following up on this patch. Please let me know if you have any
feedback or if further changes are needed.

Thanks,
Mohamad Raizudeen



More information about the linux-amlogic mailing list