Re: [PATCH 05/15] serial: 8250_mxpcie: offload XON/XOFF flow control to MUEx50 hardware
From: Andy Shevchenko
Date: Mon May 04 2026 - 11:22:05 EST
On Mon, May 4, 2026 at 11:50 AM Crescent Hsieh
<crescentcy.hsieh@xxxxxxxx> wrote:
>
> The MUEx50 UART can handle in-band software flow control (XON/XOFF)
> directly in hardware.
>
> Program the on-chip XON/XOFF characters from termios settings and enable
> the corresponding MUEx50 flow control modes when IXON or IXOFF is
> requested. Provide throttle and unthrottle callbacks so RX can be
> stopped and resumed cleanly.
...
> +static void mxpcie8250_throttle(struct uart_port *port)
> +{
> + unsigned long flags;
> + uart_port_lock_irqsave(port, &flags);
You may use guard()() from cleanup.h.
> + port->ops->stop_rx(port);
> +
> + uart_port_unlock_irqrestore(port, flags);
> +}
> +
> +static void mxpcie8250_unthrottle(struct uart_port *port)
> +{
> + struct uart_8250_port *up = up_to_u8250p(port);
> + unsigned long flags;
> +
> + uart_port_lock_irqsave(port, &flags);
> +
> + up->ier |= UART_IER_RLSI | UART_IER_RDI;
> + port->read_status_mask |= UART_LSR_DR;
> + serial_out(up, UART_IER, up->ier);
> +
> + uart_port_unlock_irqrestore(port, flags);
Ditto.
> +}
--
With Best Regards,
Andy Shevchenko