[PATCH v2 07/12] serial: imx: Stop to receive in .stop_rx()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 drivers/tty/serial/imx.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index ab05ef8d9cbd..e6def51a95f7 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)
 	struct imx_port *sport = (struct imx_port *)port;
 	u32 ucr1, ucr2;
 
-	if (sport->dma_is_rxing) {
-		if (sport->port.suspended) {
-			dmaengine_terminate_all(sport->dma_chan_rx);
-			sport->dma_is_rxing = 0;
-		} else {
-			return;
-		}
-	}
-
 	ucr2 = imx_uart_readl(sport, UCR2);
 	imx_uart_writel(sport, ucr2 & ~UCR2_RXEN, UCR2);
 
-- 
2.16.1

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux