All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler
@ 2008-10-06 20:09 Lee Nipper
  2008-10-10 22:58 ` Kim Phillips
  2008-10-12 12:34 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Lee Nipper @ 2008-10-06 20:09 UTC (permalink / raw)
  To: linux-crypto

From: Kim Phillips <kim.phillips@freescale.com>

since we ack early, the re-read interrupt status in talitos_error
may be already updated with a new value.  Pass the error ISR value
directly in order to report and handle the error based on the correct
error status.

Also remove unused error tasklet.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
---
In this series, patches 1 and 3 authored by Kim, patch 2 by Lee.

 drivers/crypto/talitos.c |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 4c47fe5..b6705a3 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -127,7 +127,6 @@ struct talitos_private {
 
 	/* request callback tasklet */
 	struct tasklet_struct done_task;
-	struct tasklet_struct error_task;
 
 	/* list of registered algorithms */
 	struct list_head alg_list;
@@ -469,16 +468,13 @@ static void report_eu_error(struct device *dev, int ch, struct talitos_desc *des
 /*
  * recover from error interrupts
  */
-static void talitos_error(unsigned long data)
+static void talitos_error(unsigned long data, u32 isr, u32 isr_lo)
 {
 	struct device *dev = (struct device *)data;
 	struct talitos_private *priv = dev_get_drvdata(dev);
 	unsigned int timeout = TALITOS_TIMEOUT;
 	int ch, error, reset_dev = 0, reset_ch = 0;
-	u32 isr, isr_lo, v, v_lo;
-
-	isr = in_be32(priv->reg + TALITOS_ISR);
-	isr_lo = in_be32(priv->reg + TALITOS_ISR_LO);
+	u32 v, v_lo;
 
 	for (ch = 0; ch < priv->num_channels; ch++) {
 		/* skip channels without errors */
@@ -566,7 +562,7 @@ static irqreturn_t talitos_interrupt(int irq, void *data)
 	out_be32(priv->reg + TALITOS_ICR_LO, isr_lo);
 
 	if (unlikely((isr & ~TALITOS_ISR_CHDONE) || isr_lo))
-		talitos_error((unsigned long)data);
+		talitos_error((unsigned long)data, isr, isr_lo);
 	else
 		if (likely(isr & TALITOS_ISR_CHDONE))
 			tasklet_schedule(&priv->done_task);
@@ -1391,7 +1387,6 @@ static int __devexit talitos_remove(struct of_device *ofdev)
 	}
 
 	tasklet_kill(&priv->done_task);
-	tasklet_kill(&priv->error_task);
 
 	iounmap(priv->reg);
 
@@ -1452,7 +1447,6 @@ static int talitos_probe(struct of_device *ofdev,
 	priv->ofdev = ofdev;
 
 	tasklet_init(&priv->done_task, talitos_done, (unsigned long)dev);
-	tasklet_init(&priv->error_task, talitos_error, (unsigned long)dev);
 
 	priv->irq = irq_of_parse_and_map(np, 0);
 
-- 
1.5.6.2



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler
  2008-10-06 20:09 [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler Lee Nipper
@ 2008-10-10 22:58 ` Kim Phillips
  2008-10-11  2:15   ` Herbert Xu
  2008-10-12 12:34 ` Herbert Xu
  1 sibling, 1 reply; 5+ messages in thread
From: Kim Phillips @ 2008-10-10 22:58 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto, Lee Nipper, Vishnu

On Mon, 06 Oct 2008 15:09:00 -0500
Lee Nipper <lee.nipper@freescale.com> wrote:

> From: Kim Phillips <kim.phillips@freescale.com>
> 
> since we ack early, the re-read interrupt status in talitos_error
> may be already updated with a new value.  Pass the error ISR value
> directly in order to report and handle the error based on the correct
> error status.
> 
> Also remove unused error tasklet.
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Lee Nipper <lee.nipper@freescale.com>
> ---

Herbert, I noticed your crypto update pull request was missing this
patch series (and the off-by-one fix from Suresh).  I realize they were
posted a bit late, but are they under consideration for 2.6.28?

Kim

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler
  2008-10-10 22:58 ` Kim Phillips
@ 2008-10-11  2:15   ` Herbert Xu
  0 siblings, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2008-10-11  2:15 UTC (permalink / raw)
  To: Kim Phillips; +Cc: linux-crypto, Lee Nipper, Vishnu

On Fri, Oct 10, 2008 at 05:58:48PM -0500, Kim Phillips wrote:
>
> Herbert, I noticed your crypto update pull request was missing this
> patch series (and the off-by-one fix from Suresh).  I realize they were
> posted a bit late, but are they under consideration for 2.6.28?

I'm going to run them through cryptodev-2.6 before pushing upstream
if the schedule works out.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler
  2008-10-06 20:09 [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler Lee Nipper
  2008-10-10 22:58 ` Kim Phillips
@ 2008-10-12 12:34 ` Herbert Xu
  2008-10-13 14:52   ` Lee Nipper
  1 sibling, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2008-10-12 12:34 UTC (permalink / raw)
  To: Lee Nipper; +Cc: linux-crypto

Lee Nipper <lee.nipper@freescale.com> wrote:
> From: Kim Phillips <kim.phillips@freescale.com>
> 
> since we ack early, the re-read interrupt status in talitos_error
> may be already updated with a new value.  Pass the error ISR value
> directly in order to report and handle the error based on the correct
> error status.
> 
> Also remove unused error tasklet.
> 
> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
> Signed-off-by: Lee Nipper <lee.nipper@freescale.com>

I've applied all three patches.  However, I had to fix up the
bits around INIT_LIST_HEAD in 1 and 3.  So please check the
cryptodev-2.6 tree and let me know if it's wrong.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler
  2008-10-12 12:34 ` Herbert Xu
@ 2008-10-13 14:52   ` Lee Nipper
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Nipper @ 2008-10-13 14:52 UTC (permalink / raw)
  To: Herbert Xu; +Cc: linux-crypto

On Sun, 2008-10-12 at 05:34 -0700, Herbert Xu wrote:
> I've applied all three patches.  However, I had to fix up the
> bits around INIT_LIST_HEAD in 1 and 3.  So please check the
> cryptodev-2.6 tree and let me know if it's wrong.
> 
I checked cryptodev-2.6 and it looks good.  Thank you!

I thought I had double checked the 3 patches against mainline
but obviously I had not.  I must have gotten skewed a bit.
I will be more careful.

Thanks for the fix up.

Lee


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-10-13 14:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-06 20:09 [PATCH 1/3] crypto: talitos - pass correct interrupt status to error handler Lee Nipper
2008-10-10 22:58 ` Kim Phillips
2008-10-11  2:15   ` Herbert Xu
2008-10-12 12:34 ` Herbert Xu
2008-10-13 14:52   ` Lee Nipper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.