diff options
author | Cyrille Pitchen <cyrille.pitchen@atmel.com> | 2017-01-26 17:07:47 +0100 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-02-03 18:16:11 +0800 |
commit | a29af939b24dc98c11e1e8a77be7669c4e4f5719 (patch) | |
tree | f4ecaf8806de9a7d8fabd8e9b788990db49ecf30 /kernel/cred.c | |
parent | 8340c7fd28d1fc0b559c84be8f0e7413d2716fc2 (diff) | |
download | linux-a29af939b24dc98c11e1e8a77be7669c4e4f5719.tar.gz linux-a29af939b24dc98c11e1e8a77be7669c4e4f5719.tar.bz2 linux-a29af939b24dc98c11e1e8a77be7669c4e4f5719.zip |
crypto: atmel-sha - update request queue management to make it more generic
This patch is a transitional patch. It splits the atmel_sha_handle_queue()
function. Now atmel_sha_handle_queue() only manages the request queue and
calls a new .start() hook from the atmel_sha_ctx structure.
This hook allows to implement different kind of requests still handled by
a single queue.
Also when the req parameter of atmel_sha_handle_queue() refers to the very
same request as the one returned by crypto_dequeue_request(), the queue
management now gives a chance to this crypto request to be handled
synchronously, hence reducing latencies. The .start() hook returns 0 if
the crypto request was handled synchronously and -EINPROGRESS if the
crypto request still need to be handled asynchronously.
Besides, the new .is_async member of the atmel_sha_dev structure helps
tagging this asynchronous state. Indeed, the req->base.complete() callback
should not be called if the crypto request is handled synchronously.
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel/cred.c')
0 files changed, 0 insertions, 0 deletions