crypto: caam - fix DMA mapping direction for RSA forms 2 & 3
authorHoria Geantă <horia.geanta@nxp.com>
Mon, 6 Aug 2018 12:29:55 +0000 (15:29 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 25 Aug 2018 11:50:41 +0000 (19:50 +0800)
commitf1bf9e60a0779ec97de9ecdc353e1d01cdd73f43
tree0628140b67c9db8657b934391ab454aa517f30e4
parentad876a18048f43b1f66f5d474b7598538668c5de
crypto: caam - fix DMA mapping direction for RSA forms 2 & 3

Crypto engine needs some temporary locations in external memory for
running RSA decrypt forms 2 and 3 (CRT).
These are named "tmp1" and "tmp2" in the PDB.

Update DMA mapping direction of tmp1 and tmp2 from TO_DEVICE to
BIDIRECTIONAL, since engine needs r/w access.

Cc: <stable@vger.kernel.org> # 4.13+
Fixes: 52e26d77b8b3 ("crypto: caam - add support for RSA key form 2")
Fixes: 4a651b122adb ("crypto: caam - add support for RSA key form 3")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caampkc.c