]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
serial: imx: Avoid post-PIO cleanup if TX DMA is started
authorIan Jamison <ian.dev@arkver.com>
Mon, 28 Aug 2017 08:02:29 +0000 (09:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 18:51:22 +0000 (20:51 +0200)
commit5aabd3b0077e0577f60a1ca6b8bdad62f23353d8
tree37925cc552690d5c32604e8d06d30ad061422f61
parent81b289cc14ba349cc4707cf664aa1c72d7dff1d7
serial: imx: Avoid post-PIO cleanup if TX DMA is started

The imx_transmit_buffer function should return if TX DMA has already
been started and not just skip over the buffer PIO write loop. (Which
did fix the initial problem, but could have unintentional side-effects)

Tested on an i.MX6Q board with half-duplex RS-485 and with RS-232.

Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Uwe-Kleine König <u.kleine-koenig@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Fixes: 514ab34dbad6 ("serial: imx: Prevent TX buffer PIO write when a DMA has been started")
Signed-off-by: Ian Jamison <ian.dev@arkver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c