]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK...
authorSherry Sun <sherry.sun@nxp.com>
Thu, 23 Feb 2023 09:39:41 +0000 (17:39 +0800)
committerRoxana Nicolescu <roxana.nicolescu@canonical.com>
Wed, 17 May 2023 11:33:19 +0000 (13:33 +0200)
commiteac72617be4ecabf91fdb68c7f7f8b5828e3ffb6
treef86d1ac15a1c0297f52673bf3abb9af76949d175
parente2611beb7e440de6f84e30a62ccf724a97218d53
tty: serial: fsl_lpuart: skip waiting for transmission complete when UARTCTRL_SBK is asserted

BugLink: https://bugs.launchpad.net/bugs/2016876
commit 2411fd94ceaa6e11326e95d6ebf876cbfed28d23 upstream.

According to LPUART RM, Transmission Complete Flag becomes 0 if queuing
a break character by writing 1 to CTRL[SBK], so here need to skip
waiting for transmission complete when UARTCTRL_SBK is asserted,
otherwise the kernel may stuck here.
And actually set_termios() adds transmission completion waiting to avoid
data loss or data breakage when changing the baud rate, but we don't
need to worry about this when queuing break characters.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20230223093941.31790-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/tty/serial/fsl_lpuart.c