DMA: PL08x: fix infinite wait when terminating transfers
authorRussell King - ARM Linux <linux@arm.linux.org.uk>
Thu, 27 Jan 2011 12:32:53 +0000 (12:32 +0000)
committerDan Williams <dan.j.williams@intel.com>
Mon, 31 Jan 2011 06:00:48 +0000 (22:00 -0800)
commitfb526210b2b961b5d590b89fd8f45c0ca5769688
tree4998a89c11eed597b3197d013ff7b558c9566f2d
parentd718f4ebddcb0bebdbf771a6672756b666e5c31b
DMA: PL08x: fix infinite wait when terminating transfers

If we try to pause a channel when terminating a transfer, we could end
up spinning for it to become inactive indefinitely, and can result in
an uninterruptible wait requiring a reset to recover from.

Terminating a transfer is supposed to take effect immediately, but may
result in data loss.

To make this clear, rename the function to pl08x_terminate_phy_chan().
Also, make sure it is always consistently called - with the spinlock
held and IRQs disabled, and ensure that the TC and ERR interrupt status
is always cleared.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/amba-pl08x.c