From: Yinghai Lu Date: Tue, 5 Feb 2008 06:27:46 +0000 (-0800) Subject: serial: keep the DTR setting for serial console. X-Git-Tag: v2.6.25-rc1~1026 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3e4642be734ce3d2c7398246d8cbced3a039f54;p=linux-2.6 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 Cc: Russell King Cc: Alan Cox Cc: Andi Kleen Cc: Bjorn Helgaas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index 3bb5d241dd..0cf382b55d 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2150,10 +2150,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); /*