MLK-25151 crypto: caam/jr - fix shared IRQ line handling
There are cases when the interrupt status register (JRINTR) is non-zero, even though there was no interrupt generated for the corresponding job ring. For example JRINTR=0x0000_0008 - i.e. JRINTR[HALT]=b'10 - indicates that the input job ring underwent a flush of all on-going jobs and processing of still-existing jobs (sitting in the ring) has been halted. This doesn't mean there's currently anything to do for this job ring. Make sure the shared IRQ line is correctly handled by updating the condition for returning IRQ_NONE, otherwise we could reach situations like: 1. interrupt handler clearing JRINTR (and thus also the JRINTR[HALT] field) while corresponding job ring is suspended and then 2. that job ring failing on resume path, due to expecting JRINTR[HALT]=b'10 and reading instead JRINTR[HALT]=b'00. Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-by: Franck LENORMAND <franck.lenormand@nxp.com> (cherry picked from commit 905aeeabe9517b1c672472052b65c28176b341d3) Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
This commit is contained in:
parent
e67919750c
commit
3032e10da7
|
@ -244,7 +244,7 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
|
|||
* tasklet if jobs done.
|
||||
*/
|
||||
irqstate = rd_reg32(&jrp->rregs->jrintstatus);
|
||||
if (!irqstate)
|
||||
if (!(irqstate & ~JRINT_ERR_HALT_MASK))
|
||||
return IRQ_NONE;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue