Commit 5d74aa7f authored by Anup Patel's avatar Anup Patel Committed by Vinod Koul

dmaengine: bcm-sba-raid: serialize dma_cookie_complete() using reqs_lock

As-per documentation in driver/dma/dmaengine.h, the
dma_cookie_complete() API should be called with lock
held.

This patch ensures that Broadcom SBA RAID driver calls
the dma_cookie_complete() API with reqs_lock held.
Signed-off-by: default avatarAnup Patel <anup.patel@broadcom.com>
Reviewed-by: default avatarRay Jui <ray.jui@broadcom.com>
Reviewed-by: default avatarScott Branden <scott.branden@broadcom.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 2bd6bf03
...@@ -442,7 +442,9 @@ static void sba_process_received_request(struct sba_device *sba, ...@@ -442,7 +442,9 @@ static void sba_process_received_request(struct sba_device *sba,
WARN_ON(tx->cookie < 0); WARN_ON(tx->cookie < 0);
if (tx->cookie > 0) { if (tx->cookie > 0) {
spin_lock_irqsave(&sba->reqs_lock, flags);
dma_cookie_complete(tx); dma_cookie_complete(tx);
spin_unlock_irqrestore(&sba->reqs_lock, flags);
dmaengine_desc_get_callback_invoke(tx, NULL); dmaengine_desc_get_callback_invoke(tx, NULL);
dma_descriptor_unmap(tx); dma_descriptor_unmap(tx);
tx->callback = NULL; tx->callback = NULL;
......
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