USB: Fix throttling in generic usbserial driver
authorJoris van Rantwijk <[email protected]>
Thu, 24 Sep 2009 18:20:20 +0000 (20:20 +0200)
committerGreg Kroah-Hartman <[email protected]>
Fri, 9 Oct 2009 20:52:08 +0000 (13:52 -0700)
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 <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/serial/generic.c

index deba08c7a0151da060ffc66f01a02325da1cbe6b..bbe005cefcfbee6fc27d139541146c7174999468 100644 (file)
@@ -546,7 +546,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);
        }
 }