aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/marvell
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-18 13:31:05 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-10-20 10:13:56 -0400
commit5d754137ab905aaaf69acf81c9c6c7005bcfe6e4 (patch)
tree9e86c316d9960eca4350a1f4a2904494fc3255eb /drivers/crypto/marvell
parentb150856152cc442050ed3041e912ff0258c50f87 (diff)
crypto: marvell/cesa - use dma_addr_t for cur_dma
cur_dma is part of the software state, not read by the hardware. Storing it in LE32 format is wrong, use dma_addr_t for this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell')
-rw-r--r--drivers/crypto/marvell/cesa.h4
-rw-r--r--drivers/crypto/marvell/tdma.c6
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/crypto/marvell/cesa.h b/drivers/crypto/marvell/cesa.h
index 8b5c0477edba..d1edf01609df 100644
--- a/drivers/crypto/marvell/cesa.h
+++ b/drivers/crypto/marvell/cesa.h
@@ -297,7 +297,9 @@ struct mv_cesa_tdma_desc {
297 u32 src; 297 u32 src;
298 u32 dst; 298 u32 dst;
299 u32 next_dma; 299 u32 next_dma;
300 u32 cur_dma; 300
301 /* Software state */
302 dma_addr_t cur_dma;
301 struct mv_cesa_tdma_desc *next; 303 struct mv_cesa_tdma_desc *next;
302 union { 304 union {
303 struct mv_cesa_op_ctx *op; 305 struct mv_cesa_op_ctx *op;
diff --git a/drivers/crypto/marvell/tdma.c b/drivers/crypto/marvell/tdma.c
index e8e8a7f7659b..c8256f5916b0 100644
--- a/drivers/crypto/marvell/tdma.c
+++ b/drivers/crypto/marvell/tdma.c
@@ -69,7 +69,7 @@ void mv_cesa_dma_cleanup(struct mv_cesa_tdma_req *dreq)
69 69
70 tdma = tdma->next; 70 tdma = tdma->next;
71 dma_pool_free(cesa_dev->dma->tdma_desc_pool, old_tdma, 71 dma_pool_free(cesa_dev->dma->tdma_desc_pool, old_tdma,
72 le32_to_cpu(old_tdma->cur_dma)); 72 old_tdma->cur_dma);
73 } 73 }
74 74
75 dreq->chain.first = NULL; 75 dreq->chain.first = NULL;
@@ -105,9 +105,9 @@ mv_cesa_dma_add_desc(struct mv_cesa_tdma_chain *chain, gfp_t flags)
105 return ERR_PTR(-ENOMEM); 105 return ERR_PTR(-ENOMEM);
106 106
107 memset(new_tdma, 0, sizeof(*new_tdma)); 107 memset(new_tdma, 0, sizeof(*new_tdma));
108 new_tdma->cur_dma = cpu_to_le32(dma_handle); 108 new_tdma->cur_dma = dma_handle;
109 if (chain->last) { 109 if (chain->last) {
110 chain->last->next_dma = new_tdma->cur_dma; 110 chain->last->next_dma = cpu_to_le32(dma_handle);
111 chain->last->next = new_tdma; 111 chain->last->next = new_tdma;
112 } else { 112 } else {
113 chain->first = new_tdma; 113 chain->first = new_tdma;