android_kernel_motorola_sm6375/drivers/tty
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tobias Schramm b4461af0a5 serial: atmel: fix incorrect baudrate setup
commit 5bfdd3c654bd879bff50c2e85e42f85ae698b42f upstream.

Commit ba47f97a18 ("serial: core: remove baud_rates when serial console
setup") changed uart_set_options to select the correct baudrate
configuration based on the absolute error between requested baudrate and
available standard baudrate settings.
Prior to that commit the baudrate was selected based on which predefined
standard baudrate did not exceed the requested baudrate.
This change of selection logic was never reflected in the atmel serial
driver. Thus the comment left in the atmel serial driver is no longer
accurate.
Additionally the manual rounding up described in that comment and applied
via (quot - 1) requests an incorrect baudrate. Since uart_set_options uses
tty_termios_encode_baud_rate to determine the appropriate baudrate flags
this can cause baudrate selection to fail entirely because
tty_termios_encode_baud_rate will only select a baudrate if relative error
between requested and selected baudrate does not exceed +/-2%.
Fix that by requesting actual, exact baudrate used by the serial.

Fixes: ba47f97a18 ("serial: core: remove baud_rates when serial console setup")
Cc: stable <stable@kernel.org>
Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
Acked-by: Richard Genoud <richard.genoud@gmail.com>
Link: https://lore.kernel.org/r/20230109072940.202936-1-t.schramm@manjaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-24 07:18:01 +01:00
..
hvc hvc/xen: lock console list traversal 2023-01-18 11:42:04 +01:00
ipwireless
serdev
serial serial: atmel: fix incorrect baudrate setup 2023-01-24 07:18:01 +01:00
vt vt: Clear selection before changing the font 2022-09-15 12:04:51 +02:00
amiserial.c
cyclades.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
ehv_bytechan.c
goldfish.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
isicom.c
Kconfig
Makefile
mips_ejtag_fdc.c
moxa.c tty: drivers/tty/, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send 2022-11-25 17:42:14 +01:00
n_hdlc.c
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:14:20 +02:00
rocket.c
rocket.h
rocket_int.h
synclink.c
synclink_gt.c tty: synclink_gt: Fix null-pointer-dereference in slgt_clean() 2022-06-14 18:11:59 +02:00
synclinkmp.c
sysrq.c
tty_audit.c
tty_baudrate.c
tty_buffer.c tty: use new tty_insert_flip_string_and_push_buffer() in pty_write() 2022-07-29 17:14:20 +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