lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfwR+FWGf3e8JJssJ6ori9vZg+Nou5xOk8MpZ2CccKNLQ@mail.gmail.com>
Date: Sun, 30 Nov 2025 19:17:38 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Crescent Hsieh <crescentcy.hsieh@...a.com>
Cc: gregkh@...uxfoundation.org, jirislaby@...nel.org, 
	ilpo.jarvinen@...ux.intel.com, linux-kernel@...r.kernel.org, 
	linux-serial@...r.kernel.org
Subject: Re: [PATCH v1 04/31] serial: 8250_mxupci: enable auto RTS/CTS flow control

On Sun, Nov 30, 2025 at 12:43 PM Crescent Hsieh
<crescentcy.hsieh@...a.com> wrote:
>
> Implement a custom set_termios() to configure RTS/CTS hardware flow
> control. When CRTSCTS is enabled in termios, the UART_MCR[5] AFE (Auto
> Flow Control Enable) bit is set to allow automatic RTS/CTS signaling.

...

> +static void mxupci8250_set_termios(struct uart_port *port, struct ktermios *new,
> +                                  const struct ktermios *old)
> +{
> +       struct uart_8250_port *up = up_to_u8250p(port);
> +       struct tty_struct *tty = port->state->port.tty;
> +       unsigned int cflag = tty->termios.c_cflag;
> +
> +       serial8250_do_set_termios(port, new, old);
> +
> +       up->port.status &= ~(UPSTAT_AUTORTS | UPSTAT_AUTOCTS);
> +
> +       up->mcr &= ~UART_MCR_AFE;
> +
> +       if (cflag & CRTSCTS) {
> +               up->mcr |= (UART_MCR_AFE | UART_MCR_RTS);
> +               up->port.status |= (UPSTAT_AUTORTS | UPSTAT_AUTOCTS);
> +       }
> +       serial_out(up, UART_MCR, up->mcr);
> +}

Here I have a déjà vu feeling, i.e. some other drivers may also do the
same or very similar steps to enable it (8250_dw?). Can we create a
helper for all of them? And if this is the case, perhaps add it to
8250_pcilib.c?

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ