CHROMIUM: dmaengine: tegra: discard isr when xfer not done

Works around an issue where we receive a DMA interrupt when the transfer
is not yet complete.  ACK the interrupt and allow the transfer to
continue.  The transfer should be completed by a new DMA interrupt, or
in the case of the UART driver, be terminated by the UART ISR
appropriately.

This has only been observed so far on bluetooth transfers over UART.
UART will terminate in progress Rx DMAs constantly when it detects data
has not been received for some time.  This is expected behavior to keep
moving data along and not wait for full DMA buffers.

While we don't know the root cause of this issue yet, it is probable that
this is due to the DMA being terminated from the UART ISR, but then
subsequently raising a DMA interrupt for that DMA.  We will have started
a new DMA at this point which now becomes the target of this DMA
interrupt.  We'll erroneously complete this new DMA early and cause data
corruption.

When UART terminates a DMA, it *should* be ACKing all outstanding
DMA interrupts before starting a new transfer and avoiding this problem.
Obviously the theory above hinges on this not being done correctly.

BUG=chrome-os-partner:58782
TEST=Bluetooth stress: A2DP, File Transfer

Change-Id: I9757dd1c7c17387a337d898b133654de812f00f5
Signed-off-by: Christopher Freeman <cfreeman@nvidia.com>
1 file changed