From: Weili Qian Date: Sat, 11 Dec 2021 11:25:16 +0000 (+0800) Subject: crypto: hisilicon/qm - modify the handling method after abnormal interruption X-Git-Tag: v6.1-rc5~2292^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=145dcedd0e17f40bd8066a0234a19e40463367db;p=platform%2Fkernel%2Flinux-starfive.git crypto: hisilicon/qm - modify the handling method after abnormal interruption After processing an interrupt event and the interrupt function is enabled by writing the QM_DOORBELL_CMD_AEQ register, the hardware may generate new interrupt events due to processing other user's task when the subsequent interrupt events have not been processed. The new interrupt event will disrupt the current normal processing flow and cause other problems. Therefore, the operation of writing the QM_DOORBELL_CMD_AEQ doorbell register needs to be placed after all interrupt events processing are completed. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c index d124800..beea3a0f 100644 --- a/drivers/crypto/hisilicon/qm.c +++ b/drivers/crypto/hisilicon/qm.c @@ -1015,10 +1015,10 @@ static irqreturn_t qm_aeq_irq(int irq, void *data) aeqe++; qm->status.aeq_head++; } - - qm_db(qm, 0, QM_DOORBELL_CMD_AEQ, qm->status.aeq_head, 0); } + qm_db(qm, 0, QM_DOORBELL_CMD_AEQ, qm->status.aeq_head, 0); + return IRQ_HANDLED; }