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 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html