From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org, USB list <linux-usb@vger.kernel.org>,
Andiry Xu <andiry.xu@amd.com>
Subject: Re: uvcvideo failure under xHCI
Date: Thu, 16 Jun 2011 12:06:34 -0700 [thread overview]
Message-ID: <20110616190634.GA7290@xanatos> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1106161329250.3807-100000@iolanthe.rowland.org>
On Thu, Jun 16, 2011 at 01:39:43PM -0400, Alan Stern wrote:
> On Thu, 16 Jun 2011, Sarah Sharp wrote:
>
> > > > > Alan, does that seem correct?
> > >
> > > The description of the behavior of ehci-hcd and uhci-hcd is correct.
> > > ohci-hcd behaves the same way too. And they all agree with the
> > > behavior described in the kerneldoc for struct urb in
> > > include/linux/usb.h.
> >
> > Ah, you mean this bit?
> >
> > * @status: This is read in non-iso completion functions to get the
> > * status of the particular request. ISO requests only use it
> > * to tell whether the URB was unlinked; detailed status for
> > * each frame is in the fields of the iso_frame-desc.
>
> Right. There's also some more near the end:
>
> * Completion Callbacks:
> *
> * The completion callback is made in_interrupt(), and one of the first
> * things that a completion handler should do is check the status field.
> * The status field is provided for all URBs. It is used to report
> * unlinked URBs, and status for all non-ISO transfers. It should not
> * be examined before the URB is returned to the completion handler.
>
> > > Under the circumstances, the documentation file should be changed.
> > > Sarah, can you do that along with the change to xhci-hcd?
> >
> > Sure. It feels like there should be a note about which values
> > isochronous URBs might have in the urb->status field. The USB core is
> > the only one that would be setting those, so which values would it set?
> > uvcvideo tests for these error codes:
> >
> > case -ENOENT: /* usb_kill_urb() called. */
> > case -ECONNRESET: /* usb_unlink_urb() called. */
> > case -ESHUTDOWN: /* The endpoint is being disabled. */
> > case -EPROTO: /* Device is disconnected (reported by some
> > * host controller). */
> >
> > Are there any others.
>
> -EREMOTEIO, in the unlikely event that URB_SHORT_NOT_OK is set, but no
> others.
Are you saying that the USB core will only set -EREMOTEIO for
isochronous URBs? Or do you mean that in addition to the status values
that uvcvideo checks, the USB core can also set -EREMOTEIO?
> And I wasn't aware of that last one... Host controller drivers should
> report -ESHUTDOWN to mean the device has been disconnected, not
> -EPROTO. But usually HCD don't take these events into account when
> determining URB status codes.
The xHCI driver will return -ESHUTDOWN as a status for URBs when the
host controller is dying.
Sarah Sharp
next prev parent reply other threads:[~2011-06-16 19:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 1:39 uvcvideo failure under xHCI Sarah Sharp
2011-06-16 2:59 ` Sarah Sharp
2011-06-16 8:07 ` Laurent Pinchart
2011-06-16 14:35 ` Alan Stern
2011-06-16 17:17 ` Sarah Sharp
2011-06-16 17:39 ` Alan Stern
2011-06-16 19:06 ` Sarah Sharp [this message]
2011-06-16 19:39 ` Alan Stern
2011-06-16 19:58 ` Sarah Sharp
2011-06-16 20:20 ` Alan Stern
2011-06-17 8:18 ` Laurent Pinchart
2011-06-17 16:46 ` Sarah Sharp
2011-06-17 17:01 ` Laurent Pinchart
2011-06-17 18:19 ` Sarah Sharp
2011-06-18 11:21 ` Laurent Pinchart
2011-06-16 9:22 ` Andy Walls
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=20110616190634.GA7290@xanatos \
--to=sarah.a.sharp@linux.intel.com \
--cc=andiry.xu@amd.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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