aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/pch_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/pch_dma.c')
-rw-r--r--drivers/dma/pch_dma.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 65c32f893a57..d9d95a4dd854 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -521,11 +521,11 @@ static int pd_alloc_chan_resources(struct dma_chan *chan)
521 list_add_tail(&desc->desc_node, &tmp_list); 521 list_add_tail(&desc->desc_node, &tmp_list);
522 } 522 }
523 523
524 spin_lock_bh(&pd_chan->lock); 524 spin_lock_irq(&pd_chan->lock);
525 list_splice(&tmp_list, &pd_chan->free_list); 525 list_splice(&tmp_list, &pd_chan->free_list);
526 pd_chan->descs_allocated = i; 526 pd_chan->descs_allocated = i;
527 pd_chan->completed_cookie = chan->cookie = 1; 527 pd_chan->completed_cookie = chan->cookie = 1;
528 spin_unlock_bh(&pd_chan->lock); 528 spin_unlock_irq(&pd_chan->lock);
529 529
530 pdc_enable_irq(chan, 1); 530 pdc_enable_irq(chan, 1);
531 531
@@ -543,10 +543,10 @@ static void pd_free_chan_resources(struct dma_chan *chan)
543 BUG_ON(!list_empty(&pd_chan->active_list)); 543 BUG_ON(!list_empty(&pd_chan->active_list));
544 BUG_ON(!list_empty(&pd_chan->queue)); 544 BUG_ON(!list_empty(&pd_chan->queue));
545 545
546 spin_lock_bh(&pd_chan->lock); 546 spin_lock_irq(&pd_chan->lock);
547 list_splice_init(&pd_chan->free_list, &tmp_list); 547 list_splice_init(&pd_chan->free_list, &tmp_list);
548 pd_chan->descs_allocated = 0; 548 pd_chan->descs_allocated = 0;
549 spin_unlock_bh(&pd_chan->lock); 549 spin_unlock_irq(&pd_chan->lock);
550 550
551 list_for_each_entry_safe(desc, _d, &tmp_list, desc_node) 551 list_for_each_entry_safe(desc, _d, &tmp_list, desc_node)
552 pci_pool_free(pd->pool, desc, desc->txd.phys); 552 pci_pool_free(pd->pool, desc, desc->txd.phys);
@@ -562,10 +562,10 @@ static enum dma_status pd_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
562 dma_cookie_t last_completed; 562 dma_cookie_t last_completed;
563 int ret; 563 int ret;
564 564
565 spin_lock_bh(&pd_chan->lock); 565 spin_lock_irq(&pd_chan->lock);
566 last_completed = pd_chan->completed_cookie; 566 last_completed = pd_chan->completed_cookie;
567 last_used = chan->cookie; 567 last_used = chan->cookie;
568 spin_unlock_bh(&pd_chan->lock); 568 spin_unlock_irq(&pd_chan->lock);
569 569
570 ret = dma_async_is_complete(cookie, last_completed, last_used); 570 ret = dma_async_is_complete(cookie, last_completed, last_used);
571 571
@@ -680,7 +680,7 @@ static int pd_device_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
680 if (cmd != DMA_TERMINATE_ALL) 680 if (cmd != DMA_TERMINATE_ALL)
681 return -ENXIO; 681 return -ENXIO;
682 682
683 spin_lock_bh(&pd_chan->lock); 683 spin_lock_irq(&pd_chan->lock);
684 684
685 pdc_set_mode(&pd_chan->chan, DMA_CTL0_DISABLE); 685 pdc_set_mode(&pd_chan->chan, DMA_CTL0_DISABLE);
686 686
@@ -690,7 +690,7 @@ static int pd_device_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
690 list_for_each_entry_safe(desc, _d, &list, desc_node) 690 list_for_each_entry_safe(desc, _d, &list, desc_node)
691 pdc_chain_complete(pd_chan, desc); 691 pdc_chain_complete(pd_chan, desc);
692 692
693 spin_unlock_bh(&pd_chan->lock); 693 spin_unlock_irq(&pd_chan->lock);
694 694
695 return 0; 695 return 0;
696} 696}