diff options
author | Anup Patel <anup.patel@broadcom.com> | 2017-10-03 01:22:57 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-10-23 02:05:47 -0400 |
commit | 5d74aa7f641a8bf778b87941ae6a955121f64f7d (patch) | |
tree | a36b677744348c78bcb9e0808cc3af89eefe069a | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) |
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: Anup Patel <anup.patel@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/bcm-sba-raid.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 6c2c44724637..15c558508345 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c | |||
@@ -442,7 +442,9 @@ static void sba_process_received_request(struct sba_device *sba, | |||
442 | 442 | ||
443 | WARN_ON(tx->cookie < 0); | 443 | WARN_ON(tx->cookie < 0); |
444 | if (tx->cookie > 0) { | 444 | if (tx->cookie > 0) { |
445 | spin_lock_irqsave(&sba->reqs_lock, flags); | ||
445 | dma_cookie_complete(tx); | 446 | dma_cookie_complete(tx); |
447 | spin_unlock_irqrestore(&sba->reqs_lock, flags); | ||
446 | dmaengine_desc_get_callback_invoke(tx, NULL); | 448 | dmaengine_desc_get_callback_invoke(tx, NULL); |
447 | dma_descriptor_unmap(tx); | 449 | dma_descriptor_unmap(tx); |
448 | tx->callback = NULL; | 450 | tx->callback = NULL; |