Skip to content

Commit

Permalink
crypto: sahara - use the backlog
Browse files Browse the repository at this point in the history
With commit

	7e77bde 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>
  • Loading branch information
Steffen Trumtrar authored and Herbert Xu committed Apr 8, 2015
1 parent 016baaa commit ddacc62
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/crypto/sahara.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ddacc62

Please sign in to comment.