On Fri, Jun 28, 2019 at 10:33:39AM -0400, Robert Middleton wrote: > Hi, > > I have fixed the problem for my use-case with the following patch to > not clear the FIFOs if there is still data to be transmitted: > > diff --git a/drivers/tty/serial/8250/8250_port.c > b/drivers/tty/serial/8250/8250_port.c > index d2f3310abe54..569a76d1b00a 100644 > --- a/drivers/tty/serial/8250/8250_port.c > +++ b/drivers/tty/serial/8250/8250_port.c > @@ -2441,7 +2441,10 @@ void serial8250_do_shutdown(struct uart_port *port) > */ > serial_port_out(port, UART_LCR, > serial_port_in(port, UART_LCR) & ~UART_LCR_SBC); > - serial8250_clear_fifos(up); > + if (serial_in(up, UART_LSR) & UART_LSR_TEMT){ > + /* Check if transmitter is empty before clearing FIFOs */ > + serial8250_clear_fifos(up); > + } > > #ifdef CONFIG_SERIAL_8250_RSA > /* > > I'm not sure if this is correct/the best way to do it, since I am not > sure if this is common to all drivers under 8250 or only for the Exar > chip. I can also provide a proper patch via e-mail if that makes > sense. A proper patch makes the most sense please. thanks, greg k-h