kernel_samsung_a53x/drivers/tty/serial
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
..
8250 serial: Lock console when calling into driver before registration 2024-11-19 09:22:18 +01:00
cpm_uart Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jsm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
21285.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_jtaguart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl010.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl011.c ARM: PL011: Fix DMA support 2024-11-18 12:11:46 +01:00
amba-pl011.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ar933x_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm63xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clps711x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
digicolor-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-arm-semihost.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-riscv-sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efm32-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_linflexuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_lpuart.c tty: serial: fsl_lpuart: avoid idle preamble pending if CTS is enabled 2024-11-19 09:22:39 +01:00
icom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx.c serial: imx: Correct clock error message in function probe() 2024-11-18 12:12:50 +01:00
imx_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig serial: max310x: implement I2C support 2024-11-18 23:19:53 +01:00
kgdb_nmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdboc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lantiq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_hs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max310x.c serial: max310x: fix NULL pointer dereference in I2C instantiation 2024-11-19 09:22:15 +01:00
max3100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
men_z135_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson_uart.c tty: serial: meson: fix hard LOCKUP on crtscts mode 2024-11-18 11:43:26 +01:00
milbeaut_usio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpc52xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mps2-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_geni_serial_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvebu-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-auart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap-serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
owl-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pch_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmac_zilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmac_zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnx8xxx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_geni_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rda-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rp2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa1100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung_tty.c tty: serial: samsung: fix tx_empty() to return TIOCSER_TEMT 2024-11-19 08:44:58 +01:00
sb1250-duart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc16is7xx.c serial: sc16is7xx: add check for unsupported SPI modes during probe 2024-11-18 12:12:55 +01:00
sccnxp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial-tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_core.c serial: Lock console when calling into driver before registration 2024-11-19 09:22:18 +01:00
serial_mctrl_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_mctrl_gpio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_txx9.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sifive.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st-asc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suncore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunhv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra-tcu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uartlite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vr41xx_siu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt8500_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_uartps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00