Skip to contentSkip to conversation

Late console

PATCH In review Rodolfo Giometti 2 participants 4 messages May 23, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Late console

Hello,

due my job on sleep 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
index 9e27aee..27ed4f2 100644
@@ -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) {
#1 lore raw
Quoted 3 lines · Rodolfo Giometti

due my job on sleep 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.

Patches for drivers/serial/ to:

8250/16?50 (AND CLONE UARTS) SERIAL DRIVER

P:      Russell King
M:      [email protected]
L:      [email protected]
W:      http://serial.sourceforge.net
S:      Maintained

Ralf

#2 lore raw
Quoted 9 lines · Ralf Baechle

Patches for drivers/serial/ to:

8250/16?50 (AND CLONE UARTS) SERIAL DRIVER

P:      Russell King
M:      [email protected]
L:      [email protected]
W:      http://serial.sourceforge.net
S:      Maintained

Yes, you are right, but before sending the patch there I'd like to know what do you think about.

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