]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
crypto: marvell/cesa - fix missing cpu_to_le32() in mv_cesa_dma_add_op()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 18 Oct 2015 17:31:20 +0000 (18:31 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Oct 2015 14:13:57 +0000 (22:13 +0800)
When tdma->src is freed in mv_cesa_dma_cleanup(), we convert the DMA
address from a little-endian value prior to calling dma_pool_free().
However, mv_cesa_dma_add_op() assigns tdma->src without first converting
the DMA address to little endian.  Fix this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/tdma.c

index 2738e24bcc59e4220635972b2d800536c59c911e..06bdeac27e3d8d91194d6e547e661c33585d6b9b 100644 (file)
@@ -140,7 +140,7 @@ struct mv_cesa_op_ctx *mv_cesa_dma_add_op(struct mv_cesa_tdma_chain *chain,
        tdma = chain->last;
        tdma->op = op;
        tdma->byte_cnt = (skip_ctx ? sizeof(op->desc) : sizeof(*op)) | BIT(31);
-       tdma->src = dma_handle;
+       tdma->src = cpu_to_le32(dma_handle);
        tdma->flags = CESA_TDMA_DST_IN_SRAM | CESA_TDMA_OP;
 
        return op;