Skip to content

Commit

Permalink
usb: cdc-acm: fix devices not unthrottled on open
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Otto Meta authored and Greg Kroah-Hartman committed Jun 15, 2012
1 parent 354ab85 commit 6c4707f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/class/cdc-acm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6c4707f

Please sign in to comment.