summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/omap-crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/omap-crypto.c')
-rw-r--r--drivers/crypto/omap-crypto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/omap-crypto.c b/drivers/crypto/omap-crypto.c
index 23e3777..2c42e4b 100644
--- a/drivers/crypto/omap-crypto.c
+++ b/drivers/crypto/omap-crypto.c
@@ -104,6 +104,10 @@ static int omap_crypto_check_sg(struct scatterlist *sg, int total, int bs,
return OMAP_CRYPTO_NOT_ALIGNED;
if (!IS_ALIGNED(sg->length, bs))
return OMAP_CRYPTO_NOT_ALIGNED;
+#ifdef CONFIG_ZONE_DMA
+ if (page_zonenum(sg_page(sg)) != ZONE_DMA)
+ return OMAP_CRYPTO_NOT_ALIGNED;
+#endif
len += sg->length;
sg = sg_next(sg);
OpenPOWER on IntegriCloud