From: Gilad Ben-Yossef Date: Wed, 28 Jun 2017 07:22:03 +0000 (+0300) Subject: crypto: atmel - only treat EBUSY as transient if backlog X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1606043f214f912a52195293614935811a6e3e53;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto: atmel - only treat EBUSY as transient if backlog The Atmel SHA driver was treating -EBUSY as indication of queueing to backlog without checking that backlog is enabled for the request. Fix it by checking request flags. Cc: Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index a9482023d7d3..dad4e5bad827 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1204,7 +1204,9 @@ static int atmel_sha_finup(struct ahash_request *req) ctx->flags |= SHA_FLAGS_FINUP; err1 = atmel_sha_update(req); - if (err1 == -EINPROGRESS || err1 == -EBUSY) + if (err1 == -EINPROGRESS || + (err1 == -EBUSY && (ahash_request_flags(req) & + CRYPTO_TFM_REQ_MAY_BACKLOG))) return err1; /*