]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - replace sg_count() with sg_nents_for_len()
authorHoria Geantă <horia.geanta@nxp.com>
Fri, 10 Feb 2017 12:07:19 +0000 (14:07 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 15 Feb 2017 05:23:39 +0000 (13:23 +0800)
commit9f2e6266fe4f624a43bc33f6b1fe15c27da8312a
treeea919e3f21fb0fbff4c7e5dd6e4eadf88904371e
parent8f1b3665f9b4ee0cf9839108d3d0b3e09c164107
crypto: caam - replace sg_count() with sg_nents_for_len()

Replace internal sg_count() function and the convoluted logic
around it with the standard sg_nents_for_len() function.
src_nents, dst_nents now hold the number of SW S/G entries,
instead of the HW S/G table entries.

With this change, null (zero length) input data for AEAD case
needs to be handled in a visible way. req->src is no longer
(un)mapped, pointer address is set to 0 in SEQ IN PTR command.

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