Re: [PATCH] tty: serial: Use fifo in 8250 console driver

From: Jiri Slaby
Date: Tue Jan 25 2022 - 05:41:29 EST


On 25. 01. 22, 11:18, Wander Costa wrote:
In particular, the test is checking whether there is no interrupt
pending (UART_FCR_ENABLE_FIFO == UART_IIR_NO_INT). So it oscillates
between use_fifo and not, depending on the interrupt state of the chip.

Could you change it into something like this:
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -3396,7 +3396,7 @@ void serial8250_console_write(struct
uart_8250_port *up, const char *s,

use_fifo = (up->capabilities & UART_CAP_FIFO) &&
port->fifosize > 1 &&
- (serial_port_in(port, UART_FCR) & UART_FCR_ENABLE_FIFO) &&
+ (up->fcr & UART_FCR_ENABLE_FIFO) &&
/*
* After we put a data in the fifo, the controller will
send
* it regardless of the CTS state. Therefore, only use fifo


Indeed I made a mistake here. Independent of the reported this, this
should be fixed.
Jiri, do you intend to send an official patch or should I do so?

Please you send the fix after testing the fifo mode still works with that fix.

thanks,
--
js