Re: [PATCH v2] crypto: inside-secure: initialize EIP93 state before requesting IRQ

From: Herbert Xu

Date: Thu Oct 15 2026 - 05:38:57 EST


On Fri, Oct 09, 2026 at 11:31:49AM +0800, Runyu Xiao wrote:
> devm_request_threaded_irq() can invoke the handler as soon as registration
> starts. Initialize EIP93 state before requesting it and leave device
> interrupts disabled until registration succeeds.
>
> If IRQ registration fails after the hardware and rings are initialized,
> call eip93_cleanup() before returning. This shuts down the engine and
> clears the ring registers before devres releases the DMA rings.
>
> Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <runyu.xiao@xxxxxxxxxx>
> ---
> Changes in v2:
> - Call eip93_cleanup() if IRQ registration fails after device initialization.
>
> drivers/crypto/inside-secure/eip93/eip93-main.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)

Please check the Sashiko comments:

https://sashiko.dev/#/patchset/20261009033149.1127441-1-runyu.xiao%40seu.edu.cn

Thanks,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt