]> git.baikalelectronics.ru Git - kernel.git/commit
tty: serial: fsl_lpuart: Fix Tx DMA edge case
authorAaron Brice <aaron.brice@datasoft.com>
Thu, 6 Oct 2016 22:13:04 +0000 (15:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Oct 2016 14:41:56 +0000 (16:41 +0200)
commite1de283fa6205209f2f7e33af3e343226ca3792d
treee104411d0b6a56d00ed2f6a8b274ce95292e5d66
parent84024d3d5a55a2ff738e4c1286465c79cdca53f8
tty: serial: fsl_lpuart: Fix Tx DMA edge case

In the case where head == 0 on the circular buffer, there should be one
DMA buffer, not two.  The second zero-length buffer would break the
lpuart driver, transfer would never complete.

Signed-off-by: Aaron Brice <aaron.brice@datasoft.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
Tested-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c