diff options
author | Otto Meta <otto.patches@sister-shadow.de> | 2012-06-06 12:46:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-22 14:34:15 -0400 |
commit | 94b71da9193eb95eeef8d09172998c37c2c78327 (patch) | |
tree | 4f20a7e7705e4e5112817779582048a345409597 | |
parent | 2c1a56c8c620ff93050ee4ef545cc585d2f93034 (diff) |
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>
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 158f6312143..496e06e5fa6 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) | |||
498 | 498 | ||
499 | usb_autopm_put_interface(acm->control); | 499 | usb_autopm_put_interface(acm->control); |
500 | 500 | ||
501 | /* | ||
502 | * Unthrottle device in case the TTY was closed while throttled. | ||
503 | */ | ||
504 | spin_lock_irq(&acm->read_lock); | ||
505 | acm->throttled = 0; | ||
506 | acm->throttle_req = 0; | ||
507 | spin_unlock_irq(&acm->read_lock); | ||
508 | |||
501 | if (acm_submit_read_urbs(acm, GFP_KERNEL)) | 509 | if (acm_submit_read_urbs(acm, GFP_KERNEL)) |
502 | goto bail_out; | 510 | goto bail_out; |
503 | 511 | ||