[PATCH] Revert "serial: 8250: Clear CON_PRINTBUFFER on port re-registration"

From: Fushuai Wang

Date: Fri Jul 24 2026 - 03:25:46 EST


From: Fushuai Wang <wangfushuai@xxxxxxxxx>

This reverts commit d338ab1d90603f875c4f7ed223406535378173a5.

This may cause some boot logs to be lost on some platforms.

Reported-by: Mark Brown <broonie@xxxxxxxxxx>
Reported-by: Anirudh Srinivasan <asrinivasan@xxxxxxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/all/20260522101042.21976-1-fushuai.wang@xxxxxxxxx/
Signed-off-by: Fushuai Wang <wangfushuai@xxxxxxxxx>
---
drivers/tty/serial/8250/8250_core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index c0e8a4efbdcc..f49862d90eeb 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -720,12 +720,8 @@ int serial8250_register_8250_port(const struct uart_8250_port *up)
/* Preserve specified console flow control. */
cons_flow = uart_cons_flow_enabled(&uart->port);

- if (uart->port.dev) {
- if (uart_console(&uart->port))
- uart->port.cons->flags &= ~CON_PRINTBUFFER;
-
+ if (uart->port.dev)
uart_remove_one_port(&serial8250_reg, &uart->port);
- }

uart->port.ctrl_id = up->port.ctrl_id;
uart->port.port_id = up->port.port_id;
--
2.36.1