Skip to contentSkip to conversation

serial: ma35d1: Do not force-enable an unselected console

PATCH New Karl Mehltretter 2 participants 2 messages Oct 12

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: ma35d1: Do not force-enable an unselected console

When another console is selected and there is no matching ttyNVT console argument, the core accepts the MA35D1 console without calling its setup function because it has CON_ENABLED set before registration. Its index remains -1 and printk repeatedly reports an invalid port, flooding the console and preventing boot.

Let the console core enable it after successful setup.

Fixes 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
Assisted-by LLM
---
 drivers/tty/serial/ma35d1_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/ma35d1_serial.c +1 -1
index 0809655f4395..3be30fb05513 100644
@@ -639,7 +639,7 @@ static struct console ma35d1serial_console = {
 	.write   = ma35d1serial_console_write,
 	.device  = uart_console_device,
 	.setup   = ma35d1serial_console_setup,
-	.flags   = CON_PRINTBUFFER | CON_ENABLED,
+	.flags   = CON_PRINTBUFFER,
 	.index   = -1,
 	.data    = &ma35d1serial_reg,
 };
Signature · 1 line
2.53.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines

When another console is selected and there is no matching ttyNVT console argument, the core accepts the MA35D1 console without calling its setup function because it has CON_ENABLED set before registration. Its index remains -1 and printk repeatedly reports an invalid port, flooding the console and preventing boot.

Let the console core enable it after successful setup.

Fixes 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
Assisted-by LLM

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1