All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@linux.it>
To: linux-serial@vger.kernel.org
Subject: [PATCH] Late console
Date: Thu, 25 May 2006 17:26:50 +0200	[thread overview]
Message-ID: <20060525152650.GA31742@enneenne.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 529 bytes --]

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@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

[-- Attachment #1.2: patch-au1x00-late-console --]
[-- Type: text/plain, Size: 613 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2006-05-25 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 15:26 Rodolfo Giometti [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-05-23 13:40 [PATCH] Late console Rodolfo Giometti
2006-05-23 15:33 ` Ralf Baechle
2006-05-23 15:33   ` Rodolfo Giometti
2006-05-23 17:32     ` Ralf Baechle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060525152650.GA31742@enneenne.com \
    --to=giometti@linux.it \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.