crypto: caam - change return code in caam_jr_enqueue function
authorIuliana Prodan <iuliana.prodan@nxp.com>
Wed, 12 Feb 2020 17:55:20 +0000 (19:55 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:47 +0000 (09:25 +0800)
commit4d370a1036958d7df9f1492c345b4984a4eba7f6
tree77113940ba078bb828036aec4d3a00f321ac81ab
parentd53e44fe980ba7325ac60f85312c9facf78fbba1
crypto: caam - change return code in caam_jr_enqueue function

Based on commit 6b80ea389a0b ("crypto: change transient busy return code to -ENOSPC"),
change the return code of caam_jr_enqueue function to -EINPROGRESS, in
case of success, -ENOSPC in case the CAAM is busy (has no space left
in job ring queue), -EIO if it cannot map the caller's descriptor.

Update, also, the cases for resource-freeing for each algorithm type.

This is done for later use, on backlogging support in CAAM.

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c
drivers/crypto/caam/caamhash.c
drivers/crypto/caam/caampkc.c
drivers/crypto/caam/caamrng.c
drivers/crypto/caam/jr.c
drivers/crypto/caam/key_gen.c