From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: LKML <linux-kernel@vger.kernel.org>
Cc: linux-serial@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
Pavel Machek <pavel@ucw.cz>
Subject: [RFC][PATCH -mm] Make it possible to disable serial console suspend
Date: Tue, 29 Aug 2006 21:52:43 +0200 [thread overview]
Message-ID: <200608292152.43915.rjw@sisk.pl> (raw)
Hack uart_suspend_port() and uart_resume_port() so that serial console ports
are not suspended if CONFIG_DISABLE_CONSOLE_SUSPEND is set.
This makes it possible to debug the suspend and resume routines of all device
drivers as well as the lowest-level swsusp code with the help of the serial
console.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/serial/serial_core.c | 14 ++++++++++++++
1 files changed, 14 insertions(+)
Index: linux-2.6.18-rc4-mm3/drivers/serial/serial_core.c
===================================================================
--- linux-2.6.18-rc4-mm3.orig/drivers/serial/serial_core.c
+++ linux-2.6.18-rc4-mm3/drivers/serial/serial_core.c
@@ -1930,6 +1930,13 @@ int uart_suspend_port(struct uart_driver
mutex_lock(&state->mutex);
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+ if (uart_console(port)) {
+ mutex_unlock(&state->mutex);
+ return 0;
+ }
+#endif
+
if (state->info && state->info->flags & UIF_INITIALIZED) {
const struct uart_ops *ops = port->ops;
@@ -1968,6 +1975,13 @@ int uart_resume_port(struct uart_driver
mutex_lock(&state->mutex);
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+ if (uart_console(port)) {
+ mutex_unlock(&state->mutex);
+ return 0;
+ }
+#endif
+
uart_change_pm(state, 0);
/*
next reply other threads:[~2006-08-29 19:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-29 19:52 Rafael J. Wysocki [this message]
2006-08-29 21:03 ` Pavel Machek
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=200608292152.43915.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=pavel@ucw.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®