[<prev] [next>] [day] [month] [year] [list]
Message-id: <200705291845.57949.yinghai.lu@sun.com>
Date: Tue, 29 May 2007 18:45:57 -0700
From: Yinghai Lu <Yinghai.Lu@....COM>
To: Andrew Morton <akpm@...ux-foundation.org>, Andi Kleen <ak@...e.de>,
Bjorn Helgaas <bjorn.helgaas@...com>,
Russell King <rmk@....linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 5/5] serial: set DTR in uart for kernel serial console
[PATCH 5/5] serial: set DTR in uart for kernel serial console
Some UARTs on other side need host uart DTR is set, otherwise will not
receive char from the host that kernel is runing during kernel boot stage.
BTW:
earlyprintk and early_uart are hard coded to set DTR/RTS.
Signed-off-by: Yinghai Lu <yinghai.lu@....com>
Cc: Russell King <rmk@....linux.org.uk>
Cc: Andi Kleen <ak@...e.de>
Cc: Bjorn Helgaas <bjorn.helgaas@...com>
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 326020f..bec5eb5 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)) {
+ /*
+ * some uarts on other side don't support no flow control.
+ * So we set DTR in host uart to make them happy --- YHLU
+ */
+ port->mctrl |= TIOCM_DTR;
register_console(port->cons);
+ }
/*
* Ensure UPF_DEAD is not set.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists