Skip to content

Commit

Permalink
CHROMIUM: dmaengine: tegra-adma: Avoid tasklet from self-destructing
Browse files Browse the repository at this point in the history
Fix commit 92cd07d which added code
to kill tasklet on tegra_adma_terminate_all(). But this function is
also invoked from tasklet itself resulting in forever loop. So avoid
call to tasklet_kill when called from irq context.

BUG=chrome-os-partner:46247
TEST=Launch Epic Citadel game and click on more options

Change-Id: Ic0179bdd7ace99d1a3989b43d5794a3bd550afa7
Signed-off-by: Maneet Singh <mmaneetsingh@nvidia.com>
Reviewed-on: https://chromium-review.googlesource.com/304957
Commit-Ready: Anatol Pomazau <anatol@google.com>
Tested-by: Anatol Pomazau <anatol@google.com>
Reviewed-by: Anatol Pomazau <anatol@google.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
  • Loading branch information
Maneet Singh authored and chrome-bot committed Oct 12, 2015
1 parent 2e28a73 commit 19218f4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/dma/tegra210-adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,17 @@ static void tegra_adma_terminate_all(struct dma_chan *dc)

tegra_adma_resume(tdc);
/*
* Check for any running tasklets and kill them
* Check for any running tasklets and kill them.
* But since this function can be invoked from tasklet itself,
* avoid self-destruct which would cause forever loop.
*/
if (tdc->tasklet_active) {
tdc->busy = true;
spin_unlock_irqrestore(&tdc->lock, flags);
dev_warn(tdc2dev(tdc), "Killing tasklet\n");
tasklet_kill(&tdc->tasklet);
if (!in_interrupt()) {
dev_warn(tdc2dev(tdc), "Killing tasklet\n");
tasklet_kill(&tdc->tasklet);
}
spin_lock_irqsave(&tdc->lock, flags);
tdc->busy = false;
}
Expand Down

0 comments on commit 19218f4

Please sign in to comment.