]> git.karo-electronics.de Git - karo-tx-linux.git/commit
crypto: caam - fix HW S/G in ablkcipher_giv_edesc_alloc()
authorHoria Geantă <horia.geanta@nxp.com>
Fri, 10 Feb 2017 12:07:17 +0000 (14:07 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 15 Feb 2017 05:23:38 +0000 (13:23 +0800)
commitfd88aac93e4dc7810940e854be1c3dc5adb20120
tree36429035431b0fe7cfe8d30ff1f9b19c3b3dc1a2
parent4d8348d8e3bfc3e37f3cbaaff3966a1fca8909ed
crypto: caam - fix HW S/G in ablkcipher_giv_edesc_alloc()

HW S/G generation does not work properly when the following conditions
are met:
-src == dst
-src/dst is S/G
-IV is right before (contiguous with) the first src/dst S/G entry
since "iv_contig" is set to true (iv_contig is a misnomer here and
it actually refers to the whole output being contiguous)

Fix this by setting dst S/G nents equal to src S/G nents, instead of
leaving it set to init value (0).

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c