diff options
author | Robin Gong <b38343@freescale.com> | 2014-10-10 14:55:19 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-01-15 21:18:51 -0600 |
commit | f3c7b8348d0528c111648560668a010b737444fa (patch) | |
tree | a56c323f339fa0ac1161cdc8e2b7fbb754668c7d /drivers/dma | |
parent | db384e912f153c0626ead56793d54dcef93070b1 (diff) |
MLK-9776: dma: imx-sdma: make sure BUG_ON workaround do not work in loop mode
The earlier patch for "ENGR00313512 dma: imx-sdma: A bungle of work around for
BUG ON issue" is better not applied for loop mode, since there is no any cookie
touch in loop mode which means never trigger the BUG_ON workaround. Otherwise,
if upper driver such as UART disable dma channel but the device still has sent
the data into the RXFIFO, bd buffer will be consumed quickly and then stop.That
will trigger "RX FIFO overrun", like below log:
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
imx-uart 21ec000.serial: Rx FIFO overrun
Signed-off-by: Robin Gong <b38343@freescale.com>
(cherry picked from commit ac31647b11c3e441901fa116d74ebef9051e22e5)
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 253d68b1d4a2..d16802532111 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -707,7 +707,7 @@ static void sdma_tasklet(unsigned long data) unsigned long flags; spin_lock_irqsave(&sdmac->lock, flags); - if (sdmac->status != DMA_IN_PROGRESS) { + if (sdmac->status != DMA_IN_PROGRESS && sdmac->mode != SDMA_MODE_LOOP) { spin_unlock_irqrestore(&sdmac->lock, flags); return; } @@ -738,7 +738,7 @@ static irqreturn_t sdma_int_handler(int irq, void *dev_id) sdma_update_channel_loop(sdmac); spin_lock_irqsave(&sdmac->lock, flags); - if (sdmac->status == DMA_IN_PROGRESS) + if (sdmac->status == DMA_IN_PROGRESS || sdmac->mode == SDMA_MODE_LOOP) tasklet_schedule(&sdmac->tasklet); spin_unlock_irqrestore(&sdmac->lock, flags); |