crypto: omap-sham - Add the offset of sg page to vaddr
authorVutla, Lokesh <lokeshvutla@ti.com>
Thu, 2 Apr 2015 10:02:45 +0000 (15:32 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Apr 2015 09:53:32 +0000 (17:53 +0800)
commit13cf394c8c79b5655cdc76f7ae0d9869a1434103
tree00f2a68b409cfd24881af5c466fa5a76db8a8933
parent64a31be39b8c0c0b0a00cf46a3e10a90dc336a0e
crypto: omap-sham - Add the offset of sg page to vaddr

kmap_atomic() gives only the page address of the input page.
Driver should take care of adding the offset of the scatterlist
within the page to the returned page address.
omap-sham driver is not adding the offset to page and directly operates
on the return vale of kmap_atomic(), because of which the following
error comes when running crypto tests:

00000000: d9 a1 1b 7c aa 90 3b aa 11 ab cb 25 00 b8 ac bf
[    2.338169] 00000010: c1 39 cd ff 48 d0 a8 e2 2b fa 33 a1
[    2.344008] alg: hash: Chunking test 1 failed for omap-sha256

So adding the scatterlist offset to vaddr.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c