diff options
Diffstat (limited to 'drivers/crypto/ccp/ccp-dmaengine.c')
-rw-r--r-- | drivers/crypto/ccp/ccp-dmaengine.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c index 6553912804f7..e5d9278f4019 100644 --- a/drivers/crypto/ccp/ccp-dmaengine.c +++ b/drivers/crypto/ccp/ccp-dmaengine.c | |||
@@ -63,6 +63,7 @@ static void ccp_free_chan_resources(struct dma_chan *dma_chan) | |||
63 | ccp_free_desc_resources(chan->ccp, &chan->complete); | 63 | ccp_free_desc_resources(chan->ccp, &chan->complete); |
64 | ccp_free_desc_resources(chan->ccp, &chan->active); | 64 | ccp_free_desc_resources(chan->ccp, &chan->active); |
65 | ccp_free_desc_resources(chan->ccp, &chan->pending); | 65 | ccp_free_desc_resources(chan->ccp, &chan->pending); |
66 | ccp_free_desc_resources(chan->ccp, &chan->created); | ||
66 | 67 | ||
67 | spin_unlock_irqrestore(&chan->lock, flags); | 68 | spin_unlock_irqrestore(&chan->lock, flags); |
68 | } | 69 | } |
@@ -273,6 +274,7 @@ static dma_cookie_t ccp_tx_submit(struct dma_async_tx_descriptor *tx_desc) | |||
273 | spin_lock_irqsave(&chan->lock, flags); | 274 | spin_lock_irqsave(&chan->lock, flags); |
274 | 275 | ||
275 | cookie = dma_cookie_assign(tx_desc); | 276 | cookie = dma_cookie_assign(tx_desc); |
277 | list_del(&desc->entry); | ||
276 | list_add_tail(&desc->entry, &chan->pending); | 278 | list_add_tail(&desc->entry, &chan->pending); |
277 | 279 | ||
278 | spin_unlock_irqrestore(&chan->lock, flags); | 280 | spin_unlock_irqrestore(&chan->lock, flags); |
@@ -426,7 +428,7 @@ static struct ccp_dma_desc *ccp_create_desc(struct dma_chan *dma_chan, | |||
426 | 428 | ||
427 | spin_lock_irqsave(&chan->lock, sflags); | 429 | spin_lock_irqsave(&chan->lock, sflags); |
428 | 430 | ||
429 | list_add_tail(&desc->entry, &chan->pending); | 431 | list_add_tail(&desc->entry, &chan->created); |
430 | 432 | ||
431 | spin_unlock_irqrestore(&chan->lock, sflags); | 433 | spin_unlock_irqrestore(&chan->lock, sflags); |
432 | 434 | ||
@@ -610,6 +612,7 @@ static int ccp_terminate_all(struct dma_chan *dma_chan) | |||
610 | /*TODO: Purge the complete list? */ | 612 | /*TODO: Purge the complete list? */ |
611 | ccp_free_desc_resources(chan->ccp, &chan->active); | 613 | ccp_free_desc_resources(chan->ccp, &chan->active); |
612 | ccp_free_desc_resources(chan->ccp, &chan->pending); | 614 | ccp_free_desc_resources(chan->ccp, &chan->pending); |
615 | ccp_free_desc_resources(chan->ccp, &chan->created); | ||
613 | 616 | ||
614 | spin_unlock_irqrestore(&chan->lock, flags); | 617 | spin_unlock_irqrestore(&chan->lock, flags); |
615 | 618 | ||
@@ -679,6 +682,7 @@ int ccp_dmaengine_register(struct ccp_device *ccp) | |||
679 | chan->ccp = ccp; | 682 | chan->ccp = ccp; |
680 | 683 | ||
681 | spin_lock_init(&chan->lock); | 684 | spin_lock_init(&chan->lock); |
685 | INIT_LIST_HEAD(&chan->created); | ||
682 | INIT_LIST_HEAD(&chan->pending); | 686 | INIT_LIST_HEAD(&chan->pending); |
683 | INIT_LIST_HEAD(&chan->active); | 687 | INIT_LIST_HEAD(&chan->active); |
684 | INIT_LIST_HEAD(&chan->complete); | 688 | INIT_LIST_HEAD(&chan->complete); |