Re: [PATCH] xhci: Fix HIK camera control timeout on Etron hosts
From: Kuangyi Chiang
Date: Wed Oct 28 2026 - 22:25:59 EST
Hi,
Sorry for the late reply.
Kuangyi Chiang <ki.chiang65@xxxxxxxxx> 於 2026年9月18日週五 上午9:58寫道:
>
> Hi,
>
> Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx> 於 2026年9月16日週三 下午8:18寫道:
> >
> > On 9/16/26 04:33, Kuangyi Chiang wrote:
> > > Hi,
> > >
> > > Thanks for the review.
> > >
> > > Michal Pecio <michal.pecio@xxxxxxxxx> 於 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 for the suggestions.
>
> We'll do some more testing based on your suggestions, including
> enabling USB_QUIRK_DELAY_CTRL_MSG after UVC initialization.
>
> We'll report back once we have the results.
We did some more testing.
We don't see this issue during device enumeration.
We also found that the timeout is not limited to UVC control
transfers. In one failure case, the first timeout was observed in
a UAC control transfer, followed by UVC control transfer timeouts:
[ 961.127402] usb 2-3: 5:2: failed to get current value for ch 0 (-110)
[ 971.367443] uvcvideo 2-3:1.0: Failed to query (GET_DEF) UVC control
2 on unit 2: -110 (exp. 2).
[ 976.487473] uvcvideo 2-3:1.0: Failed to query (GET_DEF) UVC control
3 on unit 2: -110 (exp. 2).
As suggested, we also tried enabling USB_QUIRK_DELAY_CTRL_MSG after
UVC initialization, but subsequent UVC control transfers still timed
out. In addition, UAC control transfers may already have timed out
before the quirk is enabled.
So far, we have reproduced the issue with these xHCI hosts:
ASMedia ASM1142 (1b21:1242)
Etron EJ168 (1b6f:7023)
Etron EJ188 (1b6f:7052)
Intel xHCI (8086:8d31)
The issue is less frequently reproducible on the ASMedia host.
The camera works with the EHCI host we tested without any additional
delay.
So we agree that this device-specific workaround should not be in the
xHCI driver. Since the issue can affect both UAC and UVC control
transfers, we plan to handle it in the corresponding class drivers.
Thanks,
Kuangyi