]> git.baikalelectronics.ru Git - kernel.git/commit
serial: Drop timeout from uart_port
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 13 Jun 2022 11:39:05 +0000 (14:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jun 2022 12:34:45 +0000 (14:34 +0200)
commitf784421d419660f0c90c2a2f7c803f94760ca022
treedd37d533edbf6b5fb962959ecc1484054e932903
parentf74b80ebfdc3f4bf55f34c7a89682148b4b2eebe
serial: Drop timeout from uart_port

Since commit cf5023c57065 ("serial: Store character timing information
to uart_port"), per frame timing information is available on uart_port.
Uart port's timeout can be derived from frame_time by multiplying with
fifosize.

Most callers of uart_poll_timeout are not made under port's lock. To be
on the safe side, make sure frame_time is only accessed once. As
fifo_size is effectively a constant, it shouldn't cause any issues.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220613113905.22962-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/driver-api/serial/driver.rst
drivers/tty/serial/mux.c
drivers/tty/serial/serial_core.c
include/linux/serial_core.h