]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2eb9fed6bd881abca4e06971fa5698dac181060d
tree4f05f8f3245710265398dfc76e37a433a81f6a15
parent9f439a35694a43285a0ac36f5d6f08fbd4ecb820
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