Commit 75964d0f authored by Horia Geantă's avatar Horia Geantă Committed by Greg Kroah-Hartman

crypto: caam - fix RNG deinstantiation error checking

commit 40c98cb5 upstream.

RNG instantiation was previously fixed by
commit 62743a41 ("crypto: caam - fix RNG init descriptor ret. code checking")
while deinstantiation was not addressed.

Since the descriptors used are similar, in the sense that they both end
with a JUMP HALT command, checking for errors should be similar too,
i.e. status code 7000_0000h should be considered successful.

Fixes: 1005bccd ("crypto: caam - enable instantiation of all RNG4 state handles")
Signed-off-by: default avatarHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 91f9f51b
...@@ -282,7 +282,8 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask) ...@@ -282,7 +282,8 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask)
/* Try to run it through DECO0 */ /* Try to run it through DECO0 */
ret = run_descriptor_deco0(ctrldev, desc, &status); ret = run_descriptor_deco0(ctrldev, desc, &status);
if (ret || status) { if (ret ||
(status && status != JRSTA_SSRC_JUMP_HALT_CC)) {
dev_err(ctrldev, dev_err(ctrldev,
"Failed to deinstantiate RNG4 SH%d\n", "Failed to deinstantiate RNG4 SH%d\n",
sh_idx); sh_idx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment