[PATCH] serial: set DTR in uart for kernel serial console



Hope format is OK. Sending with KMail Message/Insert File

YH

[PATCH] 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@xxxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Cc: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 48e259a..a925547 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2397,6 +2397,11 @@ static void __init serial8250_isa_init_ports(void)
up->mcr_force = ALPHA_KLUDGE_MCR;

up->port.ops = &serial8250_pops;
+
+ /* some uarts on other side don't support no flow control. So we set
+ * DTR in host uart to make them happy --- YHLU
+ */
+ up->port.mctrl |= TIOCM_DTR;
}

for (i = 0, up = serial8250_ports;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH 02/12] Blackfin arch: Add label to call new GPIO API
    ... That is part of the natural evolution of the kernel isn't it - per James's ... driver requested, was already claimed by yyy driver". ... UART) out many different pins. ... you need to use pin A. If you want to use the I2C that also ...
    (Linux-Kernel)
  • Re: baycom, linux, ax25 frustration
    ... Bob Bob wrote: ... kernel, so the first command in my script is "setserial /dev/ttyS1 uart ... The Baycom driver is unhappy if it does not have the UART, ... I think the kernel module allows you to change the buffer ...
    (rec.radio.amateur.digital.misc)
  • Re: [PATCH 02/12] Blackfin arch: Add label to call new GPIO API
    ... That is part of the natural evolution of the kernel isn't it - per James's ... driver requested, was already claimed by yyy driver". ... UART) out many different pins. ... you need to use pin A. If you want to use the I2C that also ...
    (Linux-Kernel)
  • Re: Ack! Only 4 uarts with FC6!
    ... on my byterunner board as well as the one uart on the motherboard. ... This sound like something I should report as a kernel bug? ... Syntax should be the same, and I don't recall this code changing ...
    (Fedora)