aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2015-04-07 11:13:41 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-04-08 10:20:06 -0400
commitddacc621f6597d503ed6a06e2beb1ed21df759f6 (patch)
tree2b8fbeb6c2b089cbcc296617b0a6e7580ed96d49 /drivers/crypto
parent016baaa1183bb0c5fb2a7de42413bba8a51c1bc8 (diff)
crypto: sahara - use the backlog
With commit 7e77bdebff5cb1e9876c561f69710b9ab8fa1f7e crypto: af_alg - fix backlog handling in place, the backlog works under all circumstances where it previously failed, atleast for the sahara driver. Use it. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/sahara.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index c38553ed792c..052562dcd302 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1096,15 +1096,20 @@ static int sahara_queue_manage(void *data)
1096{ 1096{
1097 struct sahara_dev *dev = (struct sahara_dev *)data; 1097 struct sahara_dev *dev = (struct sahara_dev *)data;
1098 struct crypto_async_request *async_req; 1098 struct crypto_async_request *async_req;
1099 struct crypto_async_request *backlog;
1099 int ret = 0; 1100 int ret = 0;
1100 1101
1101 do { 1102 do {
1102 __set_current_state(TASK_INTERRUPTIBLE); 1103 __set_current_state(TASK_INTERRUPTIBLE);
1103 1104
1104 mutex_lock(&dev->queue_mutex); 1105 mutex_lock(&dev->queue_mutex);
1106 backlog = crypto_get_backlog(&dev->queue);
1105 async_req = crypto_dequeue_request(&dev->queue); 1107 async_req = crypto_dequeue_request(&dev->queue);
1106 mutex_unlock(&dev->queue_mutex); 1108 mutex_unlock(&dev->queue_mutex);
1107 1109
1110 if (backlog)
1111 backlog->complete(backlog, -EINPROGRESS);
1112
1108 if (async_req) { 1113 if (async_req) {
1109 if (crypto_tfm_alg_type(async_req->tfm) == 1114 if (crypto_tfm_alg_type(async_req->tfm) ==
1110 CRYPTO_ALG_TYPE_AHASH) { 1115 CRYPTO_ALG_TYPE_AHASH) {