Hi! > [ Adding Pavel who disabled EFR at one point to CC. ] > > On Mon, May 25, 2020 at 07:49:54PM +0200, Denis Ahrens wrote: > > > > > > > On 25. May 2020, at 10:27, Johan Hovold wrote: > > > > > > On Sun, May 24, 2020 at 06:31:44PM +0200, Denis Ahrens wrote: > > >> From: Denis Ahrens > > >> > > >> Enable Automatic RTS/CTS flow control for the 16C950 UART in Enhanced Mode > > >> like described in the Data Sheet Revision 1.2 page 28 and 29. > > >> > > >> Without this change normal console output works, but everything putting > > >> a little more pressure on the UART simply overruns the FIFO. > > >> > > >> Signed-off-by: Denis Ahrens > > >> --- > > >> > > >> diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c > > >> index f77bf820b7a3..024235946f4d 100644 > > >> --- a/drivers/tty/serial/8250/8250_port.c > > >> +++ b/drivers/tty/serial/8250/8250_port.c > > >> @@ -2168,7 +2168,9 @@ int serial8250_do_startup(struct uart_port *port) > > >> serial_port_out(port, UART_LCR, 0); > > >> serial_icr_write(up, UART_CSR, 0); /* Reset the UART */ > > >> serial_port_out(port, UART_LCR, UART_LCR_CONF_MODE_B); > > >> - serial_port_out(port, UART_EFR, UART_EFR_ECB); > > >> + serial_port_out(port, UART_EFR, UART_EFR_ECB | > > >> + UART_EFR_RTS | > > >> + UART_EFR_CTS); > > >> serial_port_out(port, UART_LCR, 0); > > >> } > > > > > > This doesn't look right as you're now enabling automatic flow control > > > for everyone. > > > > > > Try adding this to set_termios() instead when enabling flow control. > > > > The part in set_termios() is never reached because the UART_CAP_EFR > > capability was removed ca. 10 years ago. The code fails to preserve > > the UART_EFR_ECB bit which is in the same register as UART_EFR_CTS. > > Also for some reason UART_EFR_RTS is not set. > > The EFR capability was added by commit 7a56aa45982b ("serial: add > UART_CAP_EFR and UART_CAP_SLEEP flags to 16C950 UARTs definition") and > then removed half a year later by commit 0694e2aeb81 ("serial: unbreak > billionton CF card") -- you should mention that in the commit message > too. Hmm, that's compact flash card, and long time ago. I probably still have it somewhere, but I have not used it in a long long time... Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html