Re: [PATCH v3] serial: 8250: Clear CON_PRINTBUFFER on port re-registration
From: Fushuai Wang
Date: Wed Jun 03 2026 - 02:58:26 EST
> diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
> index a428e88938eb..5419f1d22d47 100644
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -716,8 +716,12 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
> if (uart->port.type == PORT_8250_CIR)
> return -ENODEV;
>
> - if (uart->port.dev)
> + if (uart->port.dev) {
> + if (uart_console(&uart->port))
> + uart->port.cons->flags &= ~CON_PRINTBUFFER;
> +
> uart_remove_one_port(&serial8250_reg, &uart->port);
> + }
>
> uart->port.ctrl_id = up->port.ctrl_id;
> uart->port.port_id = up->port.port_id;
ping.
--
Regards,
WANG