]> 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)
commitd22f058466ee9510c701c7b40684c5c4b83c1bb3
treee104411d0b6a56d00ed2f6a8b274ce95292e5d66
parented8a4e658ab11a6539f26fb0d977292aca06c3d4
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