linux-stable/drivers/tty
Ilpo Järvinen 002949a3ae serial: stm32-usart: Correct CSIZE, bits, and parity
[ Upstream commit 1deeda8d28 ]

Add CSIZE sanitization for unsupported CSIZE configurations. In
addition, if parity is asked for but CSx was unsupported, the sensible
result is CS8+parity which requires setting USART_CR1_M0 like with 9
bits.

Incorrect CSIZE results in miscalculation of the frame bits in
tty_get_char_size() or in its predecessor where the roughly the same
code is directly within uart_update_timeout().

Fixes: c8a9d04394 (serial: stm32: fix word length configuration)
Cc: Erwan Le Ray <erwan.leray@st.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220519081808.3776-9-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:36:08 +02:00
..
hvc tty: hvc: fix return value of __setup handler 2022-04-08 14:23:50 +02:00
ipwireless
serdev
serial serial: stm32-usart: Correct CSIZE, bits, and parity 2022-06-14 18:36:08 +02:00
vt vt_ioctl: add array_index_nospec to VT_ACTIVATE 2022-02-16 12:56:33 +01:00
amiserial.c
ehv_bytechan.c
goldfish.c tty: goldfish: Use tty_port_destroy() to destroy port 2022-06-14 18:36:03 +02:00
Kconfig
Makefile
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c mxser: fix xmit_buf leak in activate when LSR == 0xff 2022-04-08 14:23:43 +02:00
n_gsm.c tty: n_gsm: Fix packet data hex dump output 2022-06-14 18:36:07 +02:00
n_hdlc.c tty: n_hdlc: make n_hdlc_tty_wakeup() asynchronous 2021-12-22 09:32:45 +01:00
n_null.c
n_tty.c tty: n_tty: Restore EOF push handling behavior 2022-06-14 18:36:03 +02:00
nozomi.c
pty.c
synclink_gt.c
sysrq.c
tty.h
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: fix deadlock caused by calling printk() under tty_port->lock 2022-06-09 10:23:11 +02:00
tty_io.c
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c
ttynull.c
vcc.c