]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
USB: Fix throttling in generic usbserial driver
authorJoris van Rantwijk <jorispubl@xs4all.nl>
Thu, 24 Sep 2009 18:20:20 +0000 (20:20 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Oct 2009 22:11:50 +0000 (15:11 -0700)
commit 63a9609513007537a0b23ac511fd73f9bd609ea0 upstream.

The generic usbserial driver in Linux 2.6.31 halts its receiving
channel in response to throttle requests from the line discipline.
Unfortunately it drops the contents of the first URB received after
throttling takes effect. This patch corrects that problem.

Signed-off-by: Joris van Rantwijk <jorispubl@xs4all.nl>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/generic.c

index ce57f6a32bdfb4cc7a5e30f78c1e8eca21a9364a..7170b696a4965dfd3131cde0fb6c14cf1415802b 100644 (file)
@@ -530,7 +530,7 @@ void usb_serial_generic_unthrottle(struct tty_struct *tty)
 
        if (was_throttled) {
                /* Resume reading from device */
-               usb_serial_generic_resubmit_read_urb(port, GFP_KERNEL);
+               flush_and_resubmit_read_urb(port);
        }
 }