All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	laurent.pinchart@ideasonboard.com, linux-usb@vger.kernel.org,
	linux-media@vger.kernel.org,
	Martin Barrett <martin.barrett@collabora.co.uk>
Subject: issue with uvcvideo and xhci
Date: Wed, 12 Dec 2012 12:47:24 +0100	[thread overview]
Message-ID: <50C86ECC.9050505@collabora.co.uk> (raw)

Hello,

We have an issue when trying to use USB cameras on a particular machine using
the latest mainline Linux 3.7 kernel. This is not a regression since the same
issue is present with older kernels (i.e: 3.5).

The cameras work fine when plugged to an USB2.0 port (using the EHCI HCD host
controller driver) but they don't when using the USB3.0 port (using the xHCI
HCD host controller driver).

The machine's USB3.0 host controller is a NEC Corporation uPD720200 USB 3.0 Host
Controller (rev 04).

When enabling trace on the uvcvideo driver I see that most frames are lost:

Dec 12 11:07:58 thinclient kernel: [ 4965.597637] uvcvideo: USB isochronous
frame lost (-18).
Dec 12 11:07:58 thinclient kernel: [ 4965.597642] uvcvideo: USB isochronous
frame lost (-18).
Dec 12 11:07:58 thinclient kernel: [ 4965.597647] uvcvideo: Marking buffer as
bad (error bit set).
Dec 12 11:07:58 thinclient kernel: [ 4965.597651] uvcvideo: Frame complete (EOF
found).
Dec 12 11:07:58 thinclient kernel: [ 4965.597655] uvcvideo: EOF in empty payload.
Dec 12 11:07:58 thinclient kernel: [ 4965.597661] uvcvideo: Dropping payload
(out of sync).
Dec 12 11:07:58 thinclient kernel: [ 4965.813294] uvcvideo: frame 486 stats:
0/2/8 packets, 0/0/8 pts

The uvcvideo checks if urb->iso_frame_desc[i].status < 0 on the
uvc_video_decode_isoc() function (drivers/media/usb/uvc/uvc_video.c).

I checked on the xhci driver and the only place where this error code (-EXDEV)
is assigned to frame->status is inside the skip_isoc_td() function
(drivers/usb/host/xhci-ring.c).

At this point I'm not sure if this is a bug on the xhci driver, another quirk
needed by the XHCI_NEC_HOST, a camera misconfiguration on the USB Video Class
driver or a firmware/hardware bug.

The cameras are reported to work on the same machine but using another operating
system (Windows).

I was wondering if you can give me some pointers on how to be sure what's the
issue or if this rings any bells to you.

I've enabled both CONFIG_USB_DEBUG and CONFIG_USB_XHCI_HCD_DEBUGGING in case you
need more debugging information.

Thanks a lot and best regards,
Javier

             reply	other threads:[~2012-12-12 11:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-12 11:47 Javier Martinez Canillas [this message]
2012-12-12 17:52 ` issue with uvcvideo and xhci Sarah Sharp
2012-12-12 22:28   ` Javier Martinez Canillas

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=50C86ECC.9050505@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.barrett@collabora.co.uk \
    --cc=sarah.a.sharp@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.