diff options
author | Leilei Zhao <leilei.zhao@atmel.com> | 2015-04-07 05:45:11 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-04-08 10:20:05 -0400 |
commit | 9cd223239a79df3cc758ecabb8473ca91599021b (patch) | |
tree | c235d3ef0573aaa853b27d7b721e6ca9da410441 /drivers/crypto | |
parent | 289b2623df34ebec4c25b7d31804b70fc90b92c6 (diff) |
crypto: atmel-aes - correct usage of dma_sync_* API
The output buffer is used for CPU access, so
the API should be dma_sync_single_for_cpu which
makes the cache line invalid in order to reload
the value in memory.
Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/atmel-aes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index fb760664d28f..0f9a9dc06a83 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c | |||
@@ -627,7 +627,7 @@ static int atmel_aes_crypt_dma_stop(struct atmel_aes_dev *dd) | |||
627 | dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); | 627 | dma_unmap_sg(dd->dev, dd->out_sg, 1, DMA_FROM_DEVICE); |
628 | dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE); | 628 | dma_unmap_sg(dd->dev, dd->in_sg, 1, DMA_TO_DEVICE); |
629 | } else { | 629 | } else { |
630 | dma_sync_single_for_device(dd->dev, dd->dma_addr_out, | 630 | dma_sync_single_for_cpu(dd->dev, dd->dma_addr_out, |
631 | dd->dma_size, DMA_FROM_DEVICE); | 631 | dd->dma_size, DMA_FROM_DEVICE); |
632 | 632 | ||
633 | /* copy data */ | 633 | /* copy data */ |