crypto: rockchip - move the crypto completion from interrupt context

It's illegal to call the completion function from hardirq context,
it will cause runtime tests to fail. Let's build a new task (done_task)
for moving update operation from hardirq context.

Signed-off-by: zain wang <wzz@rock-chips.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Zain Wang
2017-07-24 09:23:13 +08:00
committed by Herbert Xu
parent 1d5449445b
commit 641eacd156
4 changed files with 33 additions and 14 deletions

View File

@@ -42,7 +42,7 @@ static int rk_handle_req(struct rk_crypto_info *dev,
spin_lock_irqsave(&dev->lock, flags);
err = ablkcipher_enqueue_request(&dev->queue, req);
spin_unlock_irqrestore(&dev->lock, flags);
tasklet_schedule(&dev->crypto_tasklet);
tasklet_schedule(&dev->queue_task);
return err;
}