serial: ma35d1: Do not force-enable an unselected console
Subsystems (2)
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.
--- drivers/tty/serial/ma35d1_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/ma35d1_serial.c +1 -1
@@ -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
[email protected]
AI reviewSashiko 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_ENABLEDset 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 LLMSigned-off-by Karl Mehltretter <[email protected]>
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