Skip to content

Commit fd8bae3

Browse files
horiaggregkh
authored andcommitted
crypto: caam - fix RNG deinstantiation error checking
commit 40c98cb57cdbc377456116ad4582c89e329721b0 upstream. RNG instantiation was previously fixed by commit 62743a4 ("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: 1005bcc ("crypto: caam - enable instantiation of all RNG4 state handles") Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ba7681e commit fd8bae3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/crypto/caam/ctrl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ static int deinstantiate_rng(struct device *ctrldev, int state_handle_mask)
278278
/* Try to run it through DECO0 */
279279
ret = run_descriptor_deco0(ctrldev, desc, &status);
280280

281-
if (ret || status) {
281+
if (ret ||
282+
(status && status != JRSTA_SSRC_JUMP_HALT_CC)) {
282283
dev_err(ctrldev,
283284
"Failed to deinstantiate RNG4 SH%d\n",
284285
sh_idx);

0 commit comments

Comments
 (0)