From f7ec1721b38c82089b1bbd92f828cb615557cbc5 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 5 Aug 2019 11:57:00 -0700 Subject: [PATCH] tty: serial: fsl_lpuart: Don't enable TIE in .startup() or .resume() Enabling TIE in .startup() callback causes the driver to start (or at least try) to transmit data before .start_tx() is called. Which, while harmless (since TIE handler will immediately disable it), is a no-op and shouldn't really happen. Drop UARTCR2_TIE from list of bits set in lpuart_startup(). This change will also not enable TIE in .resume(), but it seems that, similart to .startup(), transmit interrupt shouldn't be enabled there either. Signed-off-by: Andrey Smirnov Cc: Stefan Agner Cc: Chris Healy Cc: Cory Tusar Cc: Lucas Stach Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-imx@nxp.com Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20190805185701.22863-6-andrew.smirnov@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/fsl_lpuart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index fb9961edce3a..5c3cc1051aa8 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1410,7 +1410,7 @@ static void lpuart_setup_watermark_enable(struct lpuart_port *sport) lpuart_setup_watermark(sport); cr2 = readb(sport->port.membase + UARTCR2); - cr2 |= UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE; + cr2 |= UARTCR2_RIE | UARTCR2_RE | UARTCR2_TE; writeb(cr2, sport->port.membase + UARTCR2); }