diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2019-05-31 19:30:00 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2019-06-01 19:47:14 +0200 |
commit | b2b1265a1d6cd12d7945b6faad91e4a214ef1bd7 (patch) | |
tree | 2a8757e6880a88f3beeae57c9ade0153c6baffe3 /target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch | |
parent | 67619619195aa57b2d3169b659e677cd8b879e2a (diff) | |
download | upstream-b2b1265a1d6cd12d7945b6faad91e4a214ef1bd7.tar.gz upstream-b2b1265a1d6cd12d7945b6faad91e4a214ef1bd7.tar.bz2 upstream-b2b1265a1d6cd12d7945b6faad91e4a214ef1bd7.zip |
apm821xx: backport accepted linux-crypto patches
Rather than wait until the patches hit vanilla and
get backported via the stable kernel, this patch
patches the crypto4xx driver with the latest fixes
from the upstream linux-crypto tree.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch')
-rw-r--r-- | target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch b/target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch new file mode 100644 index 0000000000..635ab0037e --- /dev/null +++ b/target/linux/apm821xx/patches-4.14/023-0004-crypto4xx_core-don-t-abuse-__dma_sync_page.patch @@ -0,0 +1,30 @@ +From 67d8208fba1324fa0198f9fc58a9edbe09596947 Mon Sep 17 00:00:00 2001 +From: Christoph Hellwig <hch@lst.de> +Date: Sun, 16 Dec 2018 18:19:46 +0100 +Subject: [PATCH 04/15] crypto4xx_core: don't abuse __dma_sync_page + +This function is internal to the DMA API implementation. Instead use +the DMA API to properly unmap. Note that the DMA API usage in this +driver is a disaster and urgently needs some work - it is missing all +the unmaps, seems to do a secondary map where it looks like it should +to a unmap in one place to work around cache coherency and the +directions passed in seem to be partially wrong. + +Signed-off-by: Christoph Hellwig <hch@lst.de> +Tested-by: Christian Lamparter <chunkeey@gmail.com> +Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> +--- + drivers/crypto/amcc/crypto4xx_core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/crypto/amcc/crypto4xx_core.c ++++ b/drivers/crypto/amcc/crypto4xx_core.c +@@ -596,7 +596,7 @@ static void crypto4xx_aead_done(struct c + pd->pd_ctl_len.bf.pkt_len, + dst); + } else { +- __dma_sync_page(sg_page(dst), dst->offset, dst->length, ++ dma_unmap_page(dev->core_dev->device, pd->dest, dst->length, + DMA_FROM_DEVICE); + } + |