Message ID | 1428419622-1263-1-git-send-email-s.trumtrar@pengutronix.de (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
On Tue, Apr 07, 2015 at 05:13:41PM +0200, Steffen Trumtrar wrote: > 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> Both patches applied.
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 290a7f0a681f..d488d97fcee3 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -1092,15 +1092,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) {
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> --- drivers/crypto/sahara.c | 5 +++++ 1 file changed, 5 insertions(+)