[PATCH] Late console

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 

GNU/Linux Solutions                  e-mail:    giometti@xxxxxxxxxxxx
Linux Device Driver                             giometti@xxxxxxxxx
Embedded Systems                     		giometti@xxxxxxxx
UNIX programming                     phone:     +39 349 2432127
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 9e27aee..27ed4f2 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -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) {

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux