diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2018-03-02 05:07:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-09 13:21:01 -0500 |
commit | dedc64e02f5da1c7bd0b4ec232341047a8b0142b (patch) | |
tree | 46fda2471e8defc0af3be5ff302075d3b0404ab7 | |
parent | 02b0abd3bb93ea1d9818c5c5b1fcf293f81cee37 (diff) |
serial: imx: Stop to receive in .stop_rx()
When the UART is used in DMA mode, .stop_rx() does nothing if the port
isn't suspended. This is wrong as .stop_rx() should stop receiving
characters unconditionally. When the port is about to be closed the DMA
channel is stopped in .shutdown(), so this isn't necessary to be in
.stop_rx() here, too.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/imx.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 9b92c49fc174..0ea98827ecbe 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c | |||
@@ -442,15 +442,6 @@ static void imx_stop_rx(struct uart_port *port) | |||
442 | struct imx_port *sport = (struct imx_port *)port; | 442 | struct imx_port *sport = (struct imx_port *)port; |
443 | u32 ucr1, ucr2; | 443 | u32 ucr1, ucr2; |
444 | 444 | ||
445 | if (sport->dma_is_rxing) { | ||
446 | if (sport->port.suspended) { | ||
447 | dmaengine_terminate_all(sport->dma_chan_rx); | ||
448 | sport->dma_is_rxing = 0; | ||
449 | } else { | ||
450 | return; | ||
451 | } | ||
452 | } | ||
453 | |||
454 | ucr2 = imx_uart_readl(sport, UCR2); | 445 | ucr2 = imx_uart_readl(sport, UCR2); |
455 | imx_uart_writel(sport, ucr2 & ~UCR2_RXEN, UCR2); | 446 | imx_uart_writel(sport, ucr2 & ~UCR2_RXEN, UCR2); |
456 | 447 | ||