mdm6600: Force tty->low_latency to 1
authorBenoit Goby <benoit@android.com>
Wed, 20 Oct 2010 04:58:13 +0000 (21:58 -0700)
committerBenoit Goby <benoit@android.com>
Tue, 26 Oct 2010 18:03:27 +0000 (11:03 -0700)
This makes the tty push data immediately to the ldisc when
flip_buffer_push is called instead of scheduling a delayed
workqueue. This fixes the dropped data problem.

Change-Id: I9558e3b4529653983ec9bf8af8ae7c8f8c25787f
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/serial/mdm6600.c

index 3c37fd36869cba80c86ae363bc8bd8151f486944..5f00b3fbeed99aa9d1c63d553f9b8e43b2ab7462 100644 (file)
@@ -351,6 +351,9 @@ static int mdm6600_open(struct tty_struct *tty, struct usb_serial_port *port)
 
        WARN_ON_ONCE(modem->port != port);
 
+       if (tty)
+               tty->low_latency = 1;
+
        modem->tiocm_status = 0;
 
        modem->opened = 1;
@@ -738,8 +741,8 @@ static void mdm6600_read_bulk_work(struct work_struct *work)
                c = mdm6600_pass_to_tty(tty, u->transfer_buffer,
                        u->actual_length);
                if (c != u->actual_length)
-                       pr_warn("%s: dropped %u of %u bytes\n",
-                               __func__, u->actual_length - c,
+                       pr_warn("%s: port %d: dropped %u of %u bytes\n",
+                               __func__, modem->number, u->actual_length - c,
                                u->actual_length);
                tty_kref_put(tty);