[PATCH v2 0/2] serial: 8250_mid: fix race condition between output flush and termios update

From: Tate Whiteberg

Date: Fri Aug 28 2026 - 13:58:19 EST


Fix a race condition in which setting termios while still transmitting
can corrupt transmission.

Changes in v2:
Split original patch into two: a prerequisite to to expose
wait_for_xmitr() and a successor to fix the bug.

Tate Whiteberg (2):
serial: 8250: export and rename wait_for_xmitr()
serial: 8250_mid: wait for LSR tx empty before setting termios

drivers/tty/serial/8250/8250.h | 1 +
drivers/tty/serial/8250/8250_mid.c | 7 +++++++
drivers/tty/serial/8250/8250_port.c | 13 +++++++------
3 files changed, 15 insertions(+), 6 deletions(-)

--
2.43.0