Re: [PATCH] 16C950 UART enable Hardware Flow Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 24, 2020 at 06:31:44PM +0200, Denis Ahrens wrote:
> From: Denis Ahrens <denis@xxxxxxx>
> 
> 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 <denis@xxxxxxx>
> ---
> 
> 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.

Also your patch has had all tabs turned into spaces. You may need to fix
your mail setup. Try sending the patch to yourself first and make sure
you can apply it (also take a look at git-send-email).

Johan



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux