kernel_samsung_a53x/drivers/tty
Sherry Sun 3b939a5579 tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled
commit 74cb7e0355fae9641f825afa389d3fba3b617714 upstream.

If the remote uart device is not connected or not enabled after booting
up, the CTS line is high by default. At this time, if we enable the flow
control when opening the device(for example, using “stty -F /dev/ttyLP4
crtscts” command), there will be a pending idle preamble(first writing 0
and then writing 1 to UARTCTRL_TE will queue an idle preamble) that
cannot be sent out, resulting in the uart port fail to close(waiting for
TX empty), so the user space stty will have to wait for a long time or
forever.

This is an LPUART IP bug(idle preamble has higher priority than CTS),
here add a workaround patch to enable TX CTS after enabling UARTCTRL_TE,
so that the idle preamble does not get stuck due to CTS is deasserted.

Fixes: 380c966c093e ("tty: serial: fsl_lpuart: add 32-bit register interface support")
Cc: stable <stable@kernel.org>
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Link: https://lore.kernel.org/r/20240305015706.1050769-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 09:22:39 +01:00
..
hvc hvc/xen: prevent concurrent accesses to the shared ring 2024-11-18 22:25:34 +01:00
ipwireless Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serdev Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled 2024-11-19 09:22:39 +01:00
vt tty: vt: fix 20 vs 0x20 typo in EScsiignore 2024-11-19 08:44:58 +01:00
amiserial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cyclades.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ehv_bytechan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
goldfish.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
isicom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mips_ejtag_fdc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
moxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
moxa.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxser.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxser.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_gsm.c tty: n_gsm: add sanity check for gsm->receive in gsm_receive_buf() 2024-11-18 12:11:58 +01:00
n_hdlc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_null.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_r3964.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracerouter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracesink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tracesink.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
n_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nozomi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rocket_int.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclink_gt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
synclinkmp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysrq.c tty/sysrq: replace smp_processor_id() with get_cpu() 2024-11-18 11:43:21 +01:00
tty.h tty: change tty_write_lock()'s ndelay parameter to bool 2024-11-18 12:12:49 +01:00
tty_audit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_baudrate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_buffer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_io.c usb: cdc-acm: return correct error code on unsupported break 2024-11-18 12:12:50 +01:00
tty_ioctl.c tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE 2024-11-18 12:13:20 +01:00
tty_jobctrl.c tty: tty_jobctrl: fix pid memleak in disassociate_ctty() 2024-11-18 11:43:05 +01:00
tty_ldisc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_ldsem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_mutex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tty_port.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttynull.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vcc.c tty: vcc: Add check for kstrdup() in vcc_probe() 2024-11-18 11:43:14 +01:00