mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Cc: stable <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
354ab8567a
commit
6c4707f3f8
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue