Re: [PATCH v3 2/2] serial: 8250_mid: wait for LSR tx empty before setting termios

From: Andy Shevchenko

Date: Tue Sep 01 2026 - 05:12:09 EST


On Mon, Aug 31, 2026 at 04:59:08PM +0000, Tate Whiteberg wrote:
> If mid8250_set_termios is called while data is still in transmission,
> the corresponding register updates will corrupt the transmission.
>
> Fix this by locking the port and and waiting for the transmitter to
> empty before performing updates. It is necessary to wait for both
> UART_LSR_THRE and UART_LSR_TEMT to ensure the final character is sent.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>

--
With Best Regards,
Andy Shevchenko