* [PATCH 5/5] serial: assert DTR for serial console devices
@ 2007-05-31 21:03 Yinghai Lu
0 siblings, 0 replies; only message in thread
From: Yinghai Lu @ 2007-05-31 21:03 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen; +Cc: Linux Kernel Mailing List
[PATCH 5/5] serial: assert DTR for serial console devices
Some RS-232 devices require DTR to be asserted before they can be
used. DTR is normally asserted in uart_startup() when the port is
opened. But we don't actually open serial console ports, so assert
DTR when the port is added.
BTW:
earlyprintk and early_uart are hard coded to set DTR/RTS.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 326020f..e5a3d8b 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2303,8 +2303,14 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *port)
* It may be that the port was not available.
*/
if (port->type != PORT_UNKNOWN &&
- port->cons && !(port->cons->flags & CON_ENABLED))
+ port->cons && !(port->cons->flags & CON_ENABLED)) {
+ /*
+ * We normally assert DTR when a port is opened, but serial
+ * console devices aren't actually opened, so do it here.
+ */
+ uart_set_mctrl(port, TIOCM_DTR);
register_console(port->cons);
+ }
/*
* Ensure UPF_DEAD is not set.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-31 21:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-31 21:03 [PATCH 5/5] serial: assert DTR for serial console devices 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®