Re: [PATCH] usb: cdc-wdm: avoid hanging on zero length reads

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

 



On Fri, 2013-12-20 at 14:07 +0100, Bjørn Mork wrote:
> commit 73e06865ead1 ("USB: cdc-wdm: support back-to-back
> USB_CDC_NOTIFY_RESPONSE_AVAILABLE notifications") implemented
> queued response handling. This added a new requirement: The read
> urb must be resubmitted every time we clear the WDM_READ flag if
> the response counter indicates that the device is waiting for a
> read.
> 
> Fix by factoring out the code handling the WMD_READ clearing and
> possible urb submission, calling it everywhere we clear the flag.
> 
> Without this fix, the driver ends up in a state where the read urb
> is inactive, but the response counter is positive after a zero
> length read.  This prevents the read urb from ever being submitted
> again and the driver appears to be hanging.
> 
> Fixes: 73e06865ead1 ("USB: cdc-wdm: support back-to-back
> USB_CDC_NOTIFY_RESPONSE_AVAILABLE notifications")
> Cc: Greg Suarez <gsuarez@xxxxxxxxxxxxxx>
> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
Acked-by: Oliver Neukum <oliver@xxxxxxxxxx>

--
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