Commit 1286d670 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: pl2303: fix error characters not being reported to ldisc

commit 9388e2e7 upstream.

Fix regression introduced by commit
d4fc4a7b (tty: Fix the PL2303 private
methods for sysrq).
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c3c7e4b9
...@@ -995,13 +995,15 @@ static void pl2303_push_data(struct tty_struct *tty, ...@@ -995,13 +995,15 @@ static void pl2303_push_data(struct tty_struct *tty,
/* overrun is special, not associated with a char */ /* overrun is special, not associated with a char */
if (line_status & UART_OVERRUN_ERROR) if (line_status & UART_OVERRUN_ERROR)
tty_insert_flip_char(tty, 0, TTY_OVERRUN); 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; int i;
for (i = 0; i < urb->actual_length; ++i) for (i = 0; i < urb->actual_length; ++i)
if (!usb_serial_handle_sysrq_char(tty, port, data[i])) if (!usb_serial_handle_sysrq_char(tty, port, data[i]))
tty_insert_flip_char(tty, data[i], tty_flag); tty_insert_flip_char(tty, data[i], tty_flag);
} else }
tty_insert_flip_string(tty, data, urb->actual_length);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment