diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2013-05-11 20:30:53 +0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-07-05 11:40:38 +0530 |
commit | 7bdc1e272a471062e8f310137c896e2355b46d13 (patch) | |
tree | 0ad98dbe27efd87c30faf9f481f673d2f2da6ed8 /drivers/dma/tegra20-apb-dma.c | |
parent | ac7ae754d592571478959833796b7bdf1a3c08da (diff) | |
download | op-kernel-dev-7bdc1e272a471062e8f310137c896e2355b46d13.zip op-kernel-dev-7bdc1e272a471062e8f310137c896e2355b46d13.tar.gz |
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.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/tegra20-apb-dma.c')
-rw-r--r-- | drivers/dma/tegra20-apb-dma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 5953547..f137914 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -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)) { |