crypto: s5p-sss - Look for the next request in the queue
authorNaveen Krishna Chatradhi <ch.naveen@samsung.com>
Thu, 8 May 2014 13:58:15 +0000 (21:58 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 8 May 2014 13:58:15 +0000 (21:58 +0800)
commitdc5e3f1953b8bbfa6a7e8854d352c7da007ec6d9
tree4f05f8f3245710265398dfc76e37a433a81f6a15
parentc1eb7ef2656b0bf176c0a699df4f8830fa09d9aa
crypto: s5p-sss - Look for the next request in the queue

Currently, the driver enqueues a request only if the busy bit is
false. And every request initiates a dequeue. If 2 requests arrive
simultaneously, only one of them will be dequeued.

To avoid this senario, we will enqueue the next request irrespective
of the system condition (that is what queue is here for). Also
schedule at a tasklet immediatly after the current request is done.
The tasklet will dequeue the next request in the queue, giving
continuous loop. tasklet will exit if there are no requests in the
queue.

Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
CC: David S. Miller <davem@davemloft.net>
CC: <linux-samsung-soc@vger.kernel.org>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/s5p-sss.c