From 341a64c7e69f54e319ac187721b342f7620af6d6 Mon Sep 17 00:00:00 2001 From: Vincent Whitchurch Date: Wed, 23 Jan 2019 12:59:46 +0100 Subject: crypto: axis - move request unmap outside of the queue lock The request unmap and bounce buffer copying is currently unnecessarily done while holding the queue spin lock. Signed-off-by: Lars Persson Signed-off-by: Vincent Whitchurch Signed-off-by: Herbert Xu --- drivers/crypto/axis/artpec6_crypto.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/crypto') diff --git a/drivers/crypto/axis/artpec6_crypto.c b/drivers/crypto/axis/artpec6_crypto.c index 109efab6a9df..57e5dca3253f 100644 --- a/drivers/crypto/axis/artpec6_crypto.c +++ b/drivers/crypto/axis/artpec6_crypto.c @@ -2127,11 +2127,7 @@ static void artpec6_crypto_task(unsigned long data) list_move_tail(&req->list, &complete_done); - artpec6_crypto_dma_unmap_all(req); - artpec6_crypto_copy_bounce_buffers(req); - ac->pending_count--; - artpec6_crypto_common_destroy(req); } artpec6_crypto_process_queue(ac, &complete_in_progress); @@ -2142,6 +2138,10 @@ static void artpec6_crypto_task(unsigned long data) * to allow new request submissions from the callbacks. */ list_for_each_entry_safe(req, n, &complete_done, list) { + artpec6_crypto_dma_unmap_all(req); + artpec6_crypto_copy_bounce_buffers(req); + artpec6_crypto_common_destroy(req); + req->complete(req->req); } -- cgit v1.2.3