Commit 4cd1de0a authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

tty: Sort out the USB sysrq changes that wrecked performance

We can't go around calling all sorts of magic per character functions at
full rate 3G data speed.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d6be791c
...@@ -424,10 +424,17 @@ static void flush_and_resubmit_read_urb(struct usb_serial_port *port) ...@@ -424,10 +424,17 @@ static void flush_and_resubmit_read_urb(struct usb_serial_port *port)
if (!tty) if (!tty)
goto done; goto done;
/* Push data to tty */ /* The per character mucking around with sysrq path it too slow for
for (i = 0; i < urb->actual_length; i++, ch++) { stuff like 3G modems, so shortcircuit it in the 99.9999999% of cases
if (!usb_serial_handle_sysrq_char(port, *ch)) where the USB serial is not a console anyway */
tty_insert_flip_char(tty, *ch, TTY_NORMAL); if (!port->console || !port->sysrq)
tty_insert_flip_string(tty, ch, urb->actual_length);
else {
/* Push data to tty */
for (i = 0; i < urb->actual_length; i++, ch++) {
if (!usb_serial_handle_sysrq_char(port, *ch))
tty_insert_flip_char(tty, *ch, TTY_NORMAL);
}
} }
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
tty_kref_put(tty); tty_kref_put(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