public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Re: PROBLEM: UVC ioctl() freeze after device disconnection
       [not found] <20151202142444.GB1580@8bit.pyg>
@ 2015-12-03 14:05 ` Laurent Pinchart
  0 siblings, 0 replies; only message in thread
From: Laurent Pinchart @ 2015-12-03 14:05 UTC (permalink / raw)
  To: Matteo Foppiano; +Cc: linux-media

Hi Matteo,

On Wednesday 02 December 2015 15:24:44 Matteo Foppiano wrote:
> Hi,
>  working with raspberry and UVC I've found this issue:
> 	https://github.com/raspberrypi/linux/issues/1211
> 
> As you can see in the post, the problem seems to be upstream, so I'm
> writing directly to you. Hope this is correct.

That's fine. I've additionally CC'ed the linux-media mailing list.

When the device is disconnected the USB host controller driver is supposed to 
disable all endpoints, resulting in the URB completion handler 
uvc_video_complete() being called with the status set to -ESHUTDOWN. The 
driver will then call uvc_queue_cancel() to return all queued buffers to 
userspace. VIDIOC_DQBUF should then wake up and return.

>From the above link I assume you use an RPi kernel. The RPi USB host 
controller driver is known to be pretty unstable and buggy (at least the last 
time I checked) so it might not handle device disconnection properly.

The first step to debug this would be to check whether uvc_video_complete() 
gets called with a URB error status when you disconnect the device.

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-03 14:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20151202142444.GB1580@8bit.pyg>
2015-12-03 14:05 ` PROBLEM: UVC ioctl() freeze after device disconnection Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox