]> git.baikalelectronics.ru Git - kernel.git/commit
amba-pl011​/dma: Add check for the residue in DMA callback
authorChanho Min <chanho0207@gmail.com>
Mon, 20 Feb 2012 01:24:40 +0000 (10:24 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 21:50:47 +0000 (13:50 -0800)
commit80a27960a71b5fc4365ddb6d7dddada8d04c475b
treecad255d51a09c900062d9dbd2db07432dc4b5b19
parent6f59c609b6e0f1b9a4fc18c266aa2970339d0e1f
amba-pl011​/dma: Add check for the residue in DMA callback

In DMA-operated uart, I found that rx data can be taken by the UART
interrupts during the DMA irq handler. pl011_int is occurred just
before it goes inside spin_lock_irq. When it returns to the callback,
DMA buffer already has been flushed. Then, pl011_dma_rx_chars gets
invalid data. So I add check for the residue as the patch bellow.

Signed-off-by: Chanho Min <chanho.min@lge.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c