Skip to contentSkip to conversation

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

PATCH Superseded Fushuai Wang 4 participants 5 messages Jul 24 TTY layer and serial drivers

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "serial: 8250: Clear CON_PRINTBUFFER on port re-registration"

From: Fushuai Wang <[email protected]>

This reverts commit d338ab1d90603f875c4f7ed223406535378173a5.

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

---
 drivers/tty/serial/8250/8250_core.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/tty/serial/8250/8250_core.c +1 -5
index c0e8a4efbdcc..f49862d90eeb 100644
@@ -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;
Signature · 1 line
2.36.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Fushuai Wang

From: Fushuai Wang <[email protected]>

This reverts commit d338ab1d90603f875c4f7ed223406535378173a5.

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

I also recently stumbled on commmit d338ab1d9060 ("serial: 8250: Clear CON_PRINTBUFFER on port re-registration") and was surprised to see it was accepted.

If the double-printing is happening for certain cases with 8250_pnp, I would expect 8250_pnp (not 8250_core) to detect and handle that case. 8250_core is the base for a lot of 8250 variants.

John Ogness

maintainer
#2 lore raw
In reply to Fushuai Wang
Quoted 3 lines · Fushuai Wang

From: Fushuai Wang <[email protected]>

This reverts commit d338ab1d90603f875c4f7ed223406535378173a5.

What tree has this commit?

Quoted 1 line

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

Can we get some more information than that here?

thanks,

greg k-h

#3 lore raw
Quoted 6 lines · Greg KH
Quoted 3 lines · Fushuai Wang

From: Fushuai Wang <[email protected]>

This reverts commit d338ab1d90603f875c4f7ed223406535378173a5.

What tree has this commit?

tty/tty-next
tty/tty-testing

John