From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Matteo Foppiano <matteo.foppy@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: PROBLEM: UVC ioctl() freeze after device disconnection
Date: Thu, 03 Dec 2015 16:05:52 +0200 [thread overview]
Message-ID: <21316155.qk4MC33b9a@avalon> (raw)
In-Reply-To: <20151202142444.GB1580@8bit.pyg>
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
parent reply other threads:[~2015-12-03 14:05 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20151202142444.GB1580@8bit.pyg>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=21316155.qk4MC33b9a@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=matteo.foppy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox