diff options
| -rw-r--r-- | drivers/dma/coh901318.c | 2 | ||||
| -rw-r--r-- | drivers/dma/dmaengine.c | 1 | ||||
| -rw-r--r-- | drivers/dma/dmatest.c | 2 | ||||
| -rw-r--r-- | drivers/dma/ioat/dma_v2.c | 2 | ||||
| -rw-r--r-- | drivers/dma/ipu/ipu_idmac.c | 25 |
5 files changed, 10 insertions, 22 deletions
diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index b5f2ee0f8e2c..64a937262a40 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c | |||
| @@ -613,8 +613,6 @@ static void dma_tasklet(unsigned long data) | |||
| 613 | cohd_fin->pending_irqs--; | 613 | cohd_fin->pending_irqs--; |
| 614 | cohc->completed = cohd_fin->desc.cookie; | 614 | cohc->completed = cohd_fin->desc.cookie; |
| 615 | 615 | ||
| 616 | BUG_ON(cohc->nbr_active_done && cohd_fin == NULL); | ||
| 617 | |||
| 618 | if (cohc->nbr_active_done == 0) | 616 | if (cohc->nbr_active_done == 0) |
| 619 | return; | 617 | return; |
| 620 | 618 | ||
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 6f51a0a7a8bb..e7a3230fb7d5 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
| @@ -826,6 +826,7 @@ void dma_async_device_unregister(struct dma_device *device) | |||
| 826 | chan->dev->chan = NULL; | 826 | chan->dev->chan = NULL; |
| 827 | mutex_unlock(&dma_list_mutex); | 827 | mutex_unlock(&dma_list_mutex); |
| 828 | device_unregister(&chan->dev->device); | 828 | device_unregister(&chan->dev->device); |
| 829 | free_percpu(chan->local); | ||
| 829 | } | 830 | } |
| 830 | } | 831 | } |
| 831 | EXPORT_SYMBOL(dma_async_device_unregister); | 832 | EXPORT_SYMBOL(dma_async_device_unregister); |
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 8b905161fbf4..948d563941c9 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c | |||
| @@ -467,7 +467,7 @@ err_srcs: | |||
| 467 | 467 | ||
| 468 | if (iterations > 0) | 468 | if (iterations > 0) |
| 469 | while (!kthread_should_stop()) { | 469 | while (!kthread_should_stop()) { |
| 470 | DECLARE_WAIT_QUEUE_HEAD(wait_dmatest_exit); | 470 | DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit); |
| 471 | interruptible_sleep_on(&wait_dmatest_exit); | 471 | interruptible_sleep_on(&wait_dmatest_exit); |
| 472 | } | 472 | } |
| 473 | 473 | ||
diff --git a/drivers/dma/ioat/dma_v2.c b/drivers/dma/ioat/dma_v2.c index 5f7a500e18d0..5cc37afe2bc1 100644 --- a/drivers/dma/ioat/dma_v2.c +++ b/drivers/dma/ioat/dma_v2.c | |||
| @@ -249,7 +249,7 @@ int ioat2_quiesce(struct ioat_chan_common *chan, unsigned long tmo) | |||
| 249 | if (is_ioat_active(status) || is_ioat_idle(status)) | 249 | if (is_ioat_active(status) || is_ioat_idle(status)) |
| 250 | ioat_suspend(chan); | 250 | ioat_suspend(chan); |
| 251 | while (is_ioat_active(status) || is_ioat_idle(status)) { | 251 | while (is_ioat_active(status) || is_ioat_idle(status)) { |
| 252 | if (end && time_after(jiffies, end)) { | 252 | if (tmo && time_after(jiffies, end)) { |
| 253 | err = -ETIMEDOUT; | 253 | err = -ETIMEDOUT; |
| 254 | break; | 254 | break; |
| 255 | } | 255 | } |
diff --git a/drivers/dma/ipu/ipu_idmac.c b/drivers/dma/ipu/ipu_idmac.c index 9a5bc1a7389e..e80bae1673fa 100644 --- a/drivers/dma/ipu/ipu_idmac.c +++ b/drivers/dma/ipu/ipu_idmac.c | |||
| @@ -761,12 +761,10 @@ static void ipu_select_buffer(enum ipu_channel channel, int buffer_n) | |||
| 761 | * @buffer_n: buffer number to update. | 761 | * @buffer_n: buffer number to update. |
| 762 | * 0 or 1 are the only valid values. | 762 | * 0 or 1 are the only valid values. |
| 763 | * @phyaddr: buffer physical address. | 763 | * @phyaddr: buffer physical address. |
| 764 | * @return: Returns 0 on success or negative error code on failure. This | ||
| 765 | * function will fail if the buffer is set to ready. | ||
| 766 | */ | 764 | */ |
| 767 | /* Called under spin_lock(_irqsave)(&ichan->lock) */ | 765 | /* Called under spin_lock(_irqsave)(&ichan->lock) */ |
| 768 | static int ipu_update_channel_buffer(struct idmac_channel *ichan, | 766 | static void ipu_update_channel_buffer(struct idmac_channel *ichan, |
| 769 | int buffer_n, dma_addr_t phyaddr) | 767 | int buffer_n, dma_addr_t phyaddr) |
| 770 | { | 768 | { |
| 771 | enum ipu_channel channel = ichan->dma_chan.chan_id; | 769 | enum ipu_channel channel = ichan->dma_chan.chan_id; |
| 772 | uint32_t reg; | 770 | uint32_t reg; |
| @@ -806,8 +804,6 @@ static int ipu_update_channel_buffer(struct idmac_channel *ichan, | |||
| 806 | } | 804 | } |
| 807 | 805 | ||
| 808 | spin_unlock_irqrestore(&ipu_data.lock, flags); | 806 | spin_unlock_irqrestore(&ipu_data.lock, flags); |
| 809 | |||
| 810 | return 0; | ||
| 811 | } | 807 | } |
| 812 | 808 | ||
| 813 | /* Called under spin_lock_irqsave(&ichan->lock) */ | 809 | /* Called under spin_lock_irqsave(&ichan->lock) */ |
| @@ -816,7 +812,6 @@ static int ipu_submit_buffer(struct idmac_channel *ichan, | |||
| 816 | { | 812 | { |
| 817 | unsigned int chan_id = ichan->dma_chan.chan_id; | 813 | unsigned int chan_id = ichan->dma_chan.chan_id; |
| 818 | struct device *dev = &ichan->dma_chan.dev->device; | 814 | struct device *dev = &ichan->dma_chan.dev->device; |
| 819 | int ret; | ||
| 820 | 815 | ||
| 821 | if (async_tx_test_ack(&desc->txd)) | 816 | if (async_tx_test_ack(&desc->txd)) |
| 822 | return -EINTR; | 817 | return -EINTR; |
| @@ -827,14 +822,7 @@ static int ipu_submit_buffer(struct idmac_channel *ichan, | |||
| 827 | * could make it conditional on status >= IPU_CHANNEL_ENABLED, but | 822 | * could make it conditional on status >= IPU_CHANNEL_ENABLED, but |
| 828 | * doing it again shouldn't hurt either. | 823 | * doing it again shouldn't hurt either. |
| 829 | */ | 824 | */ |
| 830 | ret = ipu_update_channel_buffer(ichan, buf_idx, | 825 | ipu_update_channel_buffer(ichan, buf_idx, sg_dma_address(sg)); |
| 831 | sg_dma_address(sg)); | ||
| 832 | |||
| 833 | if (ret < 0) { | ||
| 834 | dev_err(dev, "Updating sg %p on channel 0x%x buffer %d failed!\n", | ||
| 835 | sg, chan_id, buf_idx); | ||
| 836 | return ret; | ||
| 837 | } | ||
| 838 | 826 | ||
| 839 | ipu_select_buffer(chan_id, buf_idx); | 827 | ipu_select_buffer(chan_id, buf_idx); |
| 840 | dev_dbg(dev, "Updated sg %p on channel 0x%x buffer %d\n", | 828 | dev_dbg(dev, "Updated sg %p on channel 0x%x buffer %d\n", |
| @@ -1379,10 +1367,11 @@ static irqreturn_t idmac_interrupt(int irq, void *dev_id) | |||
| 1379 | 1367 | ||
| 1380 | if (likely(sgnew) && | 1368 | if (likely(sgnew) && |
| 1381 | ipu_submit_buffer(ichan, descnew, sgnew, ichan->active_buffer) < 0) { | 1369 | ipu_submit_buffer(ichan, descnew, sgnew, ichan->active_buffer) < 0) { |
| 1382 | callback = desc->txd.callback; | 1370 | callback = descnew->txd.callback; |
| 1383 | callback_param = desc->txd.callback_param; | 1371 | callback_param = descnew->txd.callback_param; |
| 1384 | spin_unlock(&ichan->lock); | 1372 | spin_unlock(&ichan->lock); |
| 1385 | callback(callback_param); | 1373 | if (callback) |
| 1374 | callback(callback_param); | ||
| 1386 | spin_lock(&ichan->lock); | 1375 | spin_lock(&ichan->lock); |
| 1387 | } | 1376 | } |
| 1388 | 1377 | ||
