summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorOtto Meta <otto.patches@sister-shadow.de>2012-06-06 18:46:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-14 17:13:33 -0700
commit6c4707f3f8c44ec18282e1c014c80e1c257042f9 (patch)
tree78ad3864dc655dada5ad4f667708a9da72343127 /drivers/usb
parent354ab8567ae3107a8cbe7228c3181990ba598aac (diff)
downloadop-kernel-dev-6c4707f3f8c44ec18282e1c014c80e1c257042f9.zip
op-kernel-dev-6c4707f3f8c44ec18282e1c014c80e1c257042f9.tar.gz
usb: cdc-acm: fix devices not unthrottled on open
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> Cc: stable <stable@vger.kernel.org> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-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 f2a120e..36a2a0b 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -567,6 +567,14 @@ static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
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 error_submit_read_urbs;
OpenPOWER on IntegriCloud