diff options
author | Johan Hovold <jhovold@gmail.com> | 2009-10-08 11:36:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-10-22 15:11:48 -0700 |
commit | 1286d6703bcfce075676b6fe723058abd3ff68bb (patch) | |
tree | 79ecadc20520a43cbb714338711d03ca661d86af | |
parent | c3c7e4b94878b3f85a9f5ab10c47e8d4ef531663 (diff) |
USB: pl2303: fix error characters not being reported to ldisc
commit 9388e2e71a51fab0aa2309bbb45e8a23d89a95a9 upstream.
Fix regression introduced by commit
d4fc4a7bfc2dee626f4fec1e209e58eaa4312de6 (tty: Fix the PL2303 private
methods for sysrq).
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/usb/serial/pl2303.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 124d5ae147c1..600097de714f 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -995,13 +995,15 @@ static void pl2303_push_data(struct tty_struct *tty, /* overrun is special, not associated with a char */ if (line_status & UART_OVERRUN_ERROR) tty_insert_flip_char(tty, 0, TTY_OVERRUN); - if (port->console && port->sysrq) { + + if (tty_flag == TTY_NORMAL && !(port->console && port->sysrq)) + tty_insert_flip_string(tty, data, urb->actual_length); + else { int i; for (i = 0; i < urb->actual_length; ++i) if (!usb_serial_handle_sysrq_char(tty, port, data[i])) tty_insert_flip_char(tty, data[i], tty_flag); - } else - tty_insert_flip_string(tty, data, urb->actual_length); + } tty_flip_buffer_push(tty); } |