aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class
diff options
context:
space:
mode:
authorOtto Meta <otto.patches@sister-shadow.de>2012-06-06 18:46:21 +0200
committerBen Hutchings <ben@decadent.org.uk>2012-06-19 23:18:28 +0100
commitd65602a876757353c0a5f9e7fd4c3f8c98477404 (patch)
treeeb3fbefb463c8d41fef08b75aaa222218808ed5d /drivers/usb/class
parent4dd27dc995567bd95a33956264cc987e03ecc7f9 (diff)
downloadkernel_samsung_smdk4412-d65602a876757353c0a5f9e7fd4c3f8c98477404.zip
kernel_samsung_smdk4412-d65602a876757353c0a5f9e7fd4c3f8c98477404.tar.gz
kernel_samsung_smdk4412-d65602a876757353c0a5f9e7fd4c3f8c98477404.tar.bz2
usb: cdc-acm: fix devices not unthrottled on open
commit 6c4707f3f8c44ec18282e1c014c80e1c257042f9 upstream. Currently CDC-ACM devices stay throttled when their TTY is closed while throttled, stalling further communication attempts after the next open. Unthrottling during open/activate got lost starting with kernel 3.0.0 and this patch reintroduces it. Signed-off-by: Otto Meta <otto.patches@sister-shadow.de> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r--drivers/usb/class/cdc-acm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e61d9c4..1094469 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -498,6 +498,14 @@ static int acm_tty_open(struct tty_struct *tty, struct file *filp)
usb_autopm_put_interface(acm->control);
+ /*
+ * Unthrottle device in case the TTY was closed while throttled.
+ */
+ spin_lock_irq(&acm->read_lock);
+ acm->throttled = 0;
+ acm->throttle_req = 0;
+ spin_unlock_irq(&acm->read_lock);
+
if (acm_submit_read_urbs(acm, GFP_KERNEL))
goto bail_out;