serial: 8250: Use frame time to determine timeout
authorJohn Ogness <john.ogness@linutronix.de>
Tue, 7 Jan 2025 21:26:58 +0000 (22:32 +0106)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jan 2025 15:08:24 +0000 (16:08 +0100)
commit8d5cfb1fe5d8692b2de79b3831445be982167531
treed6cc074650cf14488e30cc3a495b099ce46f4278
parentd91f98be26510f5f81ec66425bb0306d1ccd571a
serial: 8250: Use frame time to determine timeout

Rather than using a hard-coded per-character Tx-timeout of 10ms,
use the frame time to determine a timeout value. The value is
doubled to ensure that a timeout is only hit during unexpected
circumstances.

Since the frame time may not be available during early printing,
the previous 10ms value is kept as a fallback.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20250107212702.169493-3-john.ogness@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_port.c