ould result in the status URB being submitted multiple times.
>>
>> Use a mutex to protect the users count and serialize access to the
>> status start and stop operations.
>>
>> Reported-by: Shawn Nematbakhsh
>> Signed-off-by: Laurent Pinchart
>> -
Hi Laurent,
Thanks for the changes! I agree that your synchronization logic is
correct. Just two small comments:
On Mon, Apr 29, 2013 at 1:34 PM, Laurent Pinchart
wrote:
> Hi Shawn,
>
> Thank you for the patch.
>
> On Tuesday 23 April 2013 17:42:32 Shawn Nematbakhsh wrote:
>&g
adds a retry / timeout when uvc_status_open / usb_submit_urb
returns -EPERM. This usually means that usb_kill_urb is in progress, and
we just need to wait a while.
Signed-off-by: Shawn Nematbakhsh
---
drivers/media/usb/uvc/uvc_v4l2.c | 10 +-
drivers/media/usb/uvc/uvcvideo.h | 1 +
2
From: Shawn Nematbakhsh
While usb_kill_urb is in progress, calls to usb_submit_urb will fail
with -EPERM (documented in Documentation/usb/URB.txt). The UVC driver
does not correctly handle this case -- there is no synchronization
between uvc_v4l2_open / uvc_status_start and uvc_v4l2_release