aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorLee Nipper <lee.nipper@freescale.com>2008-12-20 01:09:25 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-24 19:02:33 -0500
commitca38a814c6f86db0aa58884a31093d4f096e20aa (patch)
treecad5786c84abefd9b1fe1d5a4160bda3ee798475 /drivers/crypto
parentbcf84a38f05c55180bc1225901950c7e715c0d55 (diff)
crypto: talitos - Ack done interrupt in isr instead of tasklet
Previous commit for interrupt mitigation moved the done interrupt acknowlegement from the isr to the talitos_done tasklet. This patch moves the done interrupt acknowledgement back into the isr so that done interrupts will always be acknowledged. This covers the case for acknowledging interrupts for channel done processing that has actually already been completed by the tasklet prior to fielding a pending interrupt. Signed-off-by: Lee Nipper <lee.nipper@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/talitos.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index c3df3b1df857..a3918c16b3db 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -330,11 +330,9 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch)
330 330
331 /* descriptors with their done bits set don't get the error */ 331 /* descriptors with their done bits set don't get the error */
332 rmb(); 332 rmb();
333 if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE) { 333 if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE)
334 status = 0; 334 status = 0;
335 /* Ack each pkt completed on channel */ 335 else
336 out_be32(priv->reg + TALITOS_ICR, (1 << (ch * 2)));
337 } else
338 if (!error) 336 if (!error)
339 break; 337 break;
340 else 338 else
@@ -575,17 +573,13 @@ static irqreturn_t talitos_interrupt(int irq, void *data)
575 573
576 isr = in_be32(priv->reg + TALITOS_ISR); 574 isr = in_be32(priv->reg + TALITOS_ISR);
577 isr_lo = in_be32(priv->reg + TALITOS_ISR_LO); 575 isr_lo = in_be32(priv->reg + TALITOS_ISR_LO);
576 /* Acknowledge interrupt */
577 out_be32(priv->reg + TALITOS_ICR, isr);
578 out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
578 579
579 if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo)) { 580 if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo))
580 /*
581 * Acknowledge error interrupts here.
582 * Done interrupts are ack'ed as part of done_task.
583 */
584 out_be32(priv->reg + TALITOS_ICR, isr);
585 out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
586
587 talitos_error((unsigned long)data, isr, isr_lo); 581 talitos_error((unsigned long)data, isr, isr_lo);
588 } else 582 else
589 if (likely(isr & TALITOS_ISR_CHDONE)) { 583 if (likely(isr & TALITOS_ISR_CHDONE)) {
590 /* mask further done interrupts. */ 584 /* mask further done interrupts. */
591 clrbits32(priv->reg + TALITOS_IMR, TALITOS_IMR_DONE); 585 clrbits32(priv->reg + TALITOS_IMR, TALITOS_IMR_DONE);