Re: [PATCH v2] usb: cdc-acm: fix devices not unthrottled on open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 06, 2012 at 06:46:21PM +0200, Otto Meta wrote:
> From: Otto Meta <otto.patches@xxxxxxxxxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>

Acked-by: Johan Hovold <jhovold@xxxxxxxxx>

> ---
> All stable 3.x kernels are affected in addition to 3.5-rc1 and this patch
> works with all of them.
> 
> Patch v2 now with hopefully all necessary newlines.
> 
> --- linux-3.5-rc1.orig/drivers/usb/class/cdc-acm.c	2012-06-03 03:29:26.000000000 +0200
> +++ linux-3.5-rc1/drivers/usb/class/cdc-acm.c	2012-06-06 12:59:20.725654552 +0200
> @@ -567,6 +567,14 @@
> 
>  	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;
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux