crypto: talitos - ack done interrupt in isr instead of tasklet
PATCH 1/1 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.
---
This patch applies togit://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
drivers/crypto/talitos.c | 20 +++++++------------- 1 files changed, 7 insertions(+), 13 deletions(-)
drivers/crypto/talitos.c +5 -11
@@ -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);
Herbert Xu
maintainerQuoted 10 lines · Lee Nipper
Previous commit for interrupt mitigation moved the done interrupt acknowlegement from the isr to the
talitos_donetasklet.
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 <[email protected]>Signed-off-by Kim Phillips <[email protected]>
Patch applied. Thanks Lee!
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt