aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishnu Suresh <Vishnu@freescale.com>2008-10-20 09:06:18 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2008-12-24 19:01:17 -0500
commit4b24ea971a93f5d0bec34bf7bfd0939f70cfaae6 (patch)
treed45d4e98934da0226c5f88474deaa36910ace25e
parent32bd78e0a5d34cd8e34046502bddcf31aeb38e64 (diff)
crypto: talitos - Preempt overflow interrupts off-by-one fix
In commit ec6644d6325b5a38525f1d5b20fd4bf7db05cf2a "crypto: talitos - Preempt overflow interrupts", the test in atomic_inc_not_zero was interpreted by the author to be applied after the increment operation (not before). This off-by-one fix prevents overflow error interrupts from occurring when requests are frequent and large enough to do so. Signed-off-by: Vishnu Suresh <Vishnu@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/talitos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 16c97caa17ac..c3df3b1df857 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -1598,7 +1598,7 @@ static int talitos_probe(struct of_device *ofdev,
1598 goto err_out; 1598 goto err_out;
1599 } 1599 }
1600 for (i = 0; i < priv->num_channels; i++) 1600 for (i = 0; i < priv->num_channels; i++)
1601 atomic_set(&priv->submit_count[i], -priv->chfifo_len); 1601 atomic_set(&priv->submit_count[i], -(priv->chfifo_len - 1));
1602 1602
1603 priv->head = kzalloc(sizeof(int) * priv->num_channels, GFP_KERNEL); 1603 priv->head = kzalloc(sizeof(int) * priv->num_channels, GFP_KERNEL);
1604 priv->tail = kzalloc(sizeof(int) * priv->num_channels, GFP_KERNEL); 1604 priv->tail = kzalloc(sizeof(int) * priv->num_channels, GFP_KERNEL);