dma: tegra20-apbdma: err message correction
Subsystems (3)
PATCH 1/2 dma: tegra20-apbdma: err message correction
Fixed err msg params order on irq request fail.
--- drivers/dma/tegra20-apb-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/tegra20-apb-dma.c +1 -1
@@ -1339,7 +1339,7 @@ static int tegra_dma_probe(struct platform_device *pdev)if (ret) {dev_err (&pdev->dev,"request_irq failed with err %d channel %d\n" , - i, ret); + ret, i); goto err_irq; }
Signature · 1 line
1.8.2.1
A message that is not in the archive (sent off-list or not yet received): 1368220014-12036-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 2/2 dma: tegra: avoid channel lock up after free
Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed. Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration conflict" because tdc->isr_handler still setted to handle_once_dma_done.
This happens because tegra_dma_abort_all() won't be called on channel freeing if pending list is empty and channel not busy. We need to clear isr_handler on channel freeing to avoid locking.
---
I have sent this fix some month ago and Laxman gave his ack, but since that time I found that it's not right to include multiple changes in one patch, so converted it to trivial change.
drivers/dma/tegra20-apb-dma.c | 1 + 1 file changed, 1 insertion(+)
drivers/dma/tegra20-apb-dma.c +1 -0
@@ -1191,6 +1191,7 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)list_splice_init (&tdc->free_dma_desc, &dma_desc_list);INIT_LIST_HEAD (&tdc->cb_desc); tdc->config_init = false; + tdc->isr_handler =NULL ;spin_unlock_irqrestore (&tdc->lock, flags);while (!list_empty (&dma_desc_list)) {
Signature · 1 line
1.8.2.1
Quoted 1 line · Dmitry Osipenko
Fixed err msg params order on irq request fail.
These two look fine to me, but patches to DMA drivers should be taken
through the DMA driver tree; that's Vinod Koul <[email protected]> and Dan Williams <[email protected]>.