crypto: ccp - Fix 3DES complaint from ccp-crypto module
authorHook, Gary <Gary.Hook@amd.com>
Tue, 14 May 2019 21:53:30 +0000 (21:53 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 23 May 2019 06:01:07 +0000 (14:01 +0800)
commit89646fdda4cae203185444ac7988835f36a21ee1
treec2c7fdbc3b090914cc19fa14ed6d52978a6279bd
parentc3b359d6567c0b8f413e924feb37cf025067d55a
crypto: ccp - Fix 3DES complaint from ccp-crypto module

Crypto self-tests reveal an error:

alg: skcipher: cbc-des3-ccp encryption test failed (wrong output IV) on test vector 0, cfg="in-place"

The offset value should not be recomputed when retrieving the context.
Also, a code path exists which makes decisions based on older (version 3)
hardware; a v3 device deosn't support 3DES so remove this check.

Fixes: 990672d48515 ('crypto: ccp - Enable 3DES function on v5 CCPs')

Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-ops.c