diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2015-04-07 17:13:41 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-08 22:20:06 +0800 |
commit | ddacc621f6597d503ed6a06e2beb1ed21df759f6 (patch) | |
tree | 2b8fbeb6c2b089cbcc296617b0a6e7580ed96d49 /drivers | |
parent | 016baaa1183bb0c5fb2a7de42413bba8a51c1bc8 (diff) | |
download | linux-ddacc621f6597d503ed6a06e2beb1ed21df759f6.tar.bz2 |
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')
-rw-r--r-- | drivers/crypto/sahara.c | 5 |
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) { struct sahara_dev *dev = (struct sahara_dev *)data; struct crypto_async_request *async_req; + struct crypto_async_request *backlog; int ret = 0; do { __set_current_state(TASK_INTERRUPTIBLE); mutex_lock(&dev->queue_mutex); + backlog = crypto_get_backlog(&dev->queue); async_req = crypto_dequeue_request(&dev->queue); mutex_unlock(&dev->queue_mutex); + if (backlog) + backlog->complete(backlog, -EINPROGRESS); + if (async_req) { if (crypto_tfm_alg_type(async_req->tfm) == CRYPTO_ALG_TYPE_AHASH) { |