summaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorLee Nipper <lee.nipper@freescale.com>2008-12-20 17:09:25 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-25 11:02:33 +1100
commitca38a814c6f86db0aa58884a31093d4f096e20aa (patch)
treecad5786c84abefd9b1fe1d5a4160bda3ee798475 /drivers/crypto
parentbcf84a38f05c55180bc1225901950c7e715c0d55 (diff)
downloadblackbird-op-linux-ca38a814c6f86db0aa58884a31093d4f096e20aa.tar.gz
blackbird-op-linux-ca38a814c6f86db0aa58884a31093d4f096e20aa.zip
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)
/* descriptors with their done bits set don't get the error */
rmb();
- if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE) {
+ if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE)
status = 0;
- /* Ack each pkt completed on channel */
- out_be32(priv->reg + TALITOS_ICR, (1 << (ch * 2)));
- } else
+ else
if (!error)
break;
else
@@ -575,17 +573,13 @@ static irqreturn_t talitos_interrupt(int irq, void *data)
isr = in_be32(priv->reg + TALITOS_ISR);
isr_lo = in_be32(priv->reg + TALITOS_ISR_LO);
+ /* Acknowledge interrupt */
+ out_be32(priv->reg + TALITOS_ICR, isr);
+ out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
- if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo)) {
- /*
- * Acknowledge error interrupts here.
- * Done interrupts are ack'ed as part of done_task.
- */
- out_be32(priv->reg + TALITOS_ICR, isr);
- out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
-
+ if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo))
talitos_error((unsigned long)data, isr, isr_lo);
- } else
+ else
if (likely(isr & TALITOS_ISR_CHDONE)) {
/* mask further done interrupts. */
clrbits32(priv->reg + TALITOS_IMR, TALITOS_IMR_DONE);
OpenPOWER on IntegriCloud