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 sha...@chromium.org
Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
drivers/media/usb/uvc/uvc_driver.c | 23
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
laurent.pinch...@ideasonboard.com wrote:
Hi Shawn,
Thank you for the patch.
On Tuesday 23 April 2013 17:42:32 Shawn Nematbakhsh
From: Shawn Nematbakhsh sha...@chromium.org
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
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 sha...@chromium.org
---
drivers/media/usb/uvc/uvc_v4l2.c | 10 +-
drivers/media/usb/uvc