crypto: nx - fix physical addresses added to sg lists
authorMarcelo Cerri <mhcerri@linux.vnet.ibm.com>
Fri, 2 Aug 2013 12:09:51 +0000 (12:09 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Aug 2013 06:39:44 +0000 (16:39 +1000)
commit2b7c15ca17128f7c11ebb3d4480f917829703b01
tree8c8e6f5a9c53b53d82f67139ce639469ecd9a135
parent032c8cacc702da8a53c24d24a4e3c3a572a34078
crypto: nx - fix physical addresses added to sg lists

The co-processor receives data to be hashed through scatter/gather lists
pointing to physical addresses. When a vmalloc'ed data is given, the
driver must calculate the physical address to each page of the data.

However the current version of it just calculates the physical address
once and keeps incrementing it even when a page boundary is crossed.
This patch fixes this behaviour.

Reviewed-by: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Joy Latten <jmlatten@linux.vnet.ibm.com>
Signed-off-by: Marcelo Cerri <mhcerri@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/nx/nx.c