* [PATCH] serial: keep the DTR setting for serial console.
@ 2007-08-17 23:41 Yinghai Lu
0 siblings, 0 replies; only message in thread
From: Yinghai Lu @ 2007-08-17 23:41 UTC (permalink / raw)
To: Andrew Morton, Russell King, Bjorn Helgaas, Alan Cox, Andi Kleen
Cc: Linux Kernel Mailing List
[PATCH] serial: keep the DTR setting for serial console.
with reverting "x86, serial: convert legacy COM ports to platform devices", we will have the serial console before the port is probled again.
uart_add_one_port==>uart_configure_port==>set_mcttrl(port, 0) will clear the DTR setting by uart_set_options(). then I will lose my output from serial console again.
So try to keep DTR in uart_configure_port()
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 030a606..70f1106 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2117,10 +2117,11 @@ uart_configure_port(struct uart_driver *drv, struct uart_state *state,
/*
* Ensure that the modem control lines are de-activated.
+ * keep the DTR setting that is set in uart_set_options()
* We probably don't need a spinlock around this, but
*/
spin_lock_irqsave(&port->lock, flags);
- port->ops->set_mctrl(port, 0);
+ port->ops->set_mctrl(port, port->mctrl & TIOCM_DTR);
spin_unlock_irqrestore(&port->lock, flags);
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-17 23:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-17 23:41 [PATCH] serial: keep the DTR setting for serial console Yinghai Lu
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®