Commit 5d754137 authored by Russell King's avatar Russell King Committed by Herbert Xu

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b1508561
...@@ -297,7 +297,9 @@ struct mv_cesa_tdma_desc { ...@@ -297,7 +297,9 @@ struct mv_cesa_tdma_desc {
u32 src; u32 src;
u32 dst; u32 dst;
u32 next_dma; u32 next_dma;
u32 cur_dma;
/* Software state */
dma_addr_t cur_dma;
struct mv_cesa_tdma_desc *next; struct mv_cesa_tdma_desc *next;
union { union {
struct mv_cesa_op_ctx *op; struct mv_cesa_op_ctx *op;
......
...@@ -69,7 +69,7 @@ void mv_cesa_dma_cleanup(struct mv_cesa_tdma_req *dreq) ...@@ -69,7 +69,7 @@ void mv_cesa_dma_cleanup(struct mv_cesa_tdma_req *dreq)
tdma = tdma->next; tdma = tdma->next;
dma_pool_free(cesa_dev->dma->tdma_desc_pool, old_tdma, dma_pool_free(cesa_dev->dma->tdma_desc_pool, old_tdma,
le32_to_cpu(old_tdma->cur_dma)); old_tdma->cur_dma);
} }
dreq->chain.first = NULL; dreq->chain.first = NULL;
...@@ -105,9 +105,9 @@ mv_cesa_dma_add_desc(struct mv_cesa_tdma_chain *chain, gfp_t flags) ...@@ -105,9 +105,9 @@ mv_cesa_dma_add_desc(struct mv_cesa_tdma_chain *chain, gfp_t flags)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
memset(new_tdma, 0, sizeof(*new_tdma)); memset(new_tdma, 0, sizeof(*new_tdma));
new_tdma->cur_dma = cpu_to_le32(dma_handle); new_tdma->cur_dma = dma_handle;
if (chain->last) { if (chain->last) {
chain->last->next_dma = new_tdma->cur_dma; chain->last->next_dma = cpu_to_le32(dma_handle);
chain->last->next = new_tdma; chain->last->next = new_tdma;
} else { } else {
chain->first = new_tdma; chain->first = new_tdma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment