From: Peter Hurley <peter@hurleysoftware.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Valerio Vanni <valerio.vanni@inwind.it>,
Peter Hurley <peter@hurleysoftware.com>
Subject: [PATCH 1/2] serial: core: Don't drop DTR if system console
Date: Wed, 4 Jun 2014 10:16:10 -0400 [thread overview]
Message-ID: <1401891371-4946-1-git-send-email-peter@hurleysoftware.com> (raw)
In-Reply-To: <7EC4C3FDEFF6492F91DEE16AEE0831E6@vanni.it>
If a tty is opened on a serial console, don't drop DTR on
last tty close, on tty hangup, or when resetting port hardware
via TIOCSSERIAL and TIOCSERCONFIG ioctls.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
---
drivers/tty/serial/serial_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index b68550d..498b149 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -239,7 +239,8 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
/*
* Turn off DTR and RTS early.
*/
- if (!tty || (tty->termios.c_cflag & HUPCL))
+ if (!uart_console(uport) &&
+ (!tty || (tty->termios.c_cflag & HUPCL)))
uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
uart_port_shutdown(port);
--
1.9.1
next prev parent reply other threads:[~2014-06-04 14:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 9:53 serial console does not wake from S3 suspend Valerio Vanni
2014-05-30 9:53 ` Valerio Vanni
2014-06-04 14:16 ` Peter Hurley [this message]
2014-06-04 14:16 ` [PATCH 2/2] serial: core: Preserve termios c_cflag for console resume Peter Hurley
2014-06-04 14:22 ` Greg Kroah-Hartman
2014-06-04 14:46 ` Peter Hurley
2014-06-04 14:48 ` Peter Hurley
2014-06-04 23:31 ` Valerio Vanni
2014-06-04 23:31 ` Valerio Vanni
2014-06-05 8:58 ` Valerio Vanni
2014-06-04 14:22 ` [PATCH 1/2] serial: core: Don't drop DTR if system console Greg Kroah-Hartman
2014-06-04 14:36 ` Peter Hurley
2014-06-09 13:08 ` One Thousand Gnomes
2014-06-10 1:20 ` Peter Hurley
2014-06-10 11:01 ` One Thousand Gnomes
2014-06-10 12:30 ` Peter Hurley
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=1401891371-4946-1-git-send-email-peter@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=valerio.vanni@inwind.it \
/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.