]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dma: tegra: avoid channel lock up after free
authorDmitry Osipenko <digetx@gmail.com>
Sat, 11 May 2013 16:30:53 +0000 (20:30 +0400)
committerVinod Koul <vinod.koul@intel.com>
Wed, 12 Jun 2013 02:18:53 +0000 (07:48 +0530)
commite914746058444209faf0dfec14fb45d77a6db477
tree78687128f57fb40b34077053a124dc28de04cb77
parent8dc178137a311f7c27ec6fbb56044d209bf3bbf0
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>
drivers/dma/tegra20-apb-dma.c