All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Kuangyi Chiang <ki.chiang65@gmail.com>,
	Michal Pecio <michal.pecio@gmail.com>
Cc: mathias.nyman@intel.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] xhci: Fix HIK camera control timeout on Etron hosts
Date: Wed, 16 Sep 2026 15:18:42 +0300	[thread overview]
Message-ID: <0e4c85e8-77e6-4eb9-aca1-048199f2f0e0@linux.intel.com> (raw)
In-Reply-To: <CAHN5xi0NSJO=V0=eVd4_MGp2Lg5NrwB3D+hsF87ehTSmaeeSbQ@mail.gmail.com>

On 9/16/26 04:33, Kuangyi Chiang wrote:
> Hi,
> 
> Thanks for the review.
> 
> Michal Pecio <michal.pecio@gmail.com> 於 2026年9月14日週一 下午7:09寫道:
>>
>> On Mon, 14 Sep 2026 09:30:33 +0800, Kuangyi Chiang wrote:
>>> Control transfers to the HIK 1080P Camera (2bdf:0280) can time out when
>>> the device is connected through an Etron xHCI host:
>>>
>>> [   48.363671] uvcvideo: Found UVC 1.00 device HIK 1080P Camera (2bdf:0280)
>>> [   53.465662] uvcvideo: Failed to set UVC probe control : -110 (exp. 26).
>>> [   58.585653] uvcvideo: Failed to query (129) UVC probe control : -110 (exp. 26).
>>> [   58.592967] uvcvideo: Failed to initialize the device (-5).
>>>
>>> Testing shows that at least 125 us between control transfers is required
>>> to avoid the timeout. Limit the workaround to the affected Etron host and
>>> USB device combination to avoid changing control-transfer timing for other
>>> devices.
>>
>> Any idea why it happens or why the delay helps?
> 
> We don't know the root cause yet, but we did some more testing.
> 
> We tested delays of 50us, 125us, and 200us. The issue was still
> reproducible with 50us, while 125us and 200us passed our test.
> 
> Our pass criterion is 30 successful plug/unplug cycles on each port.
> So 125us is the minimum delay we tested that consistently works.
> 

Are there issues with the control transfers already during enumeration
of the device, when reading descriptors etc, or are these issues only
visible after uvc driver is controlling the device?


> We also tried USB_QUIRK_DELAY_CTRL_MSG, but its 200ms delay is too
> long and causes UVC initialization to fail.
> 

Does it help if you as a hack set udev->quirks |= USB_QUIRK_DELAY_CTRL_MSG
_after_ enumeration and uvc initialization?

>> How many other HCs did you test this camera with?
> 
> The camera works with the EHCI host we tested without any delay.
> We can also reproduce a similar issue with an ASMedia ASM1142 xHCI
> host (1b21:1242). This patch, however, is limited to the Etron/HIK
> combination.

I think we should avoid usb device specific quirks in the xhci driver,
especially now that we know it's not really tied to a specific xHC vendor.

If this is only an issue with the control transfers sent by uvc driver
then I think this device specific quirk should be in there.

Thanks
Mathias



  reply	other threads:[~2026-09-16 12:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  1:30 [PATCH] xhci: Fix HIK camera control timeout on Etron hosts Kuangyi Chiang
2026-09-14 11:09 ` Michal Pecio
2026-09-16  1:33   ` Kuangyi Chiang
2026-09-16 12:18     ` Mathias Nyman [this message]
2026-09-18  1:58       ` Kuangyi Chiang

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=0e4c85e8-77e6-4eb9-aca1-048199f2f0e0@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ki.chiang65@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=michal.pecio@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 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.