Late console
PATCH 1/1 Late console
Hello,
due my job on sleep mode for MIPS au1x00 I need the serial console till sleep time so let me propose this patch that disables serial port suspend if a console is running on it and the kernel has CONFIG_DEBUG_KERNEL flag on.
Ciao,
Rodolfo
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127
drivers/serial/serial_core.c +8 -0
@@ -1919,6 +1919,14 @@ int uart_suspend_port(struct uart_driver {struct uart_state *state = drv->state + port->line; +#ifdef CONFIG_DEBUG_KERNEL +if (uart_console (port)) { +printk (KERN_INFO "warning! Serial console %s%d is not disabled in debug kernel mode\n" , + drv->dev_name, port->line); +return 0 ; + } +#endif +mutex_lock (&state->mutex);if (state->info && state->info->flags &UIF_INITIALIZED ) {