Patch "tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()" has been added to the 5.15-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tty-serial-fsl_lpuart-clear-lpuart-status-register-i.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit a0d2ae4c201338f64a73966733951aba65e81114
Author: Sherry Sun <sherry.sun@xxxxxxx>
Date:   Fri Nov 25 18:19:53 2022 +0800

    tty: serial: fsl_lpuart: clear LPUART Status Register in lpuart32_shutdown()
    
    [ Upstream commit 4029dfc034febb54f6dd8ea83568accc943bc088 ]
    
    The LPUART Status Register needs to be cleared when closing the uart
    port to get a clean environment when reopening the uart.
    
    Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support")
    Signed-off-by: Sherry Sun <sherry.sun@xxxxxxx>
    Link: https://lore.kernel.org/r/20221125101953.18753-4-sherry.sun@xxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 24f9001d10242..ccfd6dd5fbf4e 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1807,6 +1807,10 @@ static void lpuart32_shutdown(struct uart_port *port)
 
 	spin_lock_irqsave(&port->lock, flags);
 
+	/* clear status */
+	temp = lpuart32_read(&sport->port, UARTSTAT);
+	lpuart32_write(&sport->port, temp, UARTSTAT);
+
 	/* disable Rx/Tx DMA */
 	temp = lpuart32_read(port, UARTBAUD);
 	temp &= ~(UARTBAUD_TDMAE | UARTBAUD_RDMAE);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux