aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2014-04-21 13:06:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-24 19:13:01 -0400
commitc7d44a02ac606c2bebf90751deebec2321379d6d (patch)
tree3d16a26ddadb9f1f2b3a52ccffa7691925ce552a /drivers/tty/serial/8250
parent0f1e126b8c50a479a9047654f8ceda5ccfaa0d8a (diff)
serial_core: Commonalize crlf when working w/ a non open console port
In (efe2f29 kgdboc,kdb: Allow kdb to work on a non open console port) support was added to directly use the "write_char" functions when doing kdb over a non-open console port. This is great, but it ends up bypassing the normal code in uart_console_write() that adds a carriage return before any newlines. There appears to have been a trend to add this support directly in some console driver's poll_put_char() functions. This had a few side effects, including: - In this case we were doing LFCR, not CRLF. This was fixed in uart_console_write() back in (d358788 [SERIAL] kernel console should send CRLF not LFCR) - Not all serial drivers had the LFCR code in their poll_put_char() functions. In my case I was running serial/samsung.c which lacked it. I've moved the handling to uart_poll_put_char() to fix the above problems. Now when I use kdb (and don't point console= to the same UART) I no longer get: [0]kdb> [0]kdb> [0]kdb> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_core.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 81f909c2101f..ffee9825fbac 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1926,13 +1926,8 @@ static void serial8250_put_poll_char(struct uart_port *port,
1926 wait_for_xmitr(up, BOTH_EMPTY); 1926 wait_for_xmitr(up, BOTH_EMPTY);
1927 /* 1927 /*
1928 * Send the character out. 1928 * Send the character out.
1929 * If a LF, also do CR...
1930 */ 1929 */
1931 serial_port_out(port, UART_TX, c); 1930 serial_port_out(port, UART_TX, c);
1932 if (c == 10) {
1933 wait_for_xmitr(up, BOTH_EMPTY);
1934 serial_port_out(port, UART_TX, 13);
1935 }
1936 1931
1937 /* 1932 /*
1938 * Finally, wait for transmitter to become empty 1933 * Finally, wait for transmitter to become empty