Re: [PATCH v2] usbcore: Add quirk for 255-bytes initial config read
From: Michal Pecio
Date: Sun Jun 28 2026 - 10:51:00 EST
On Sun, 28 Jun 2026 09:55:07 -0400, Alan Stern wrote:
> On Sun, Jun 28, 2026 at 11:53:09AM +0530, Nikhil Solanke wrote:
> > I need some help with the USB_QUIRK_DELAY_INIT part. I can't figure
> > out how to make it properly work with my patch because of the
> > following reasons:
> >
> > 1. I don't want to move it to the top because, from my pov, there
> > must have been some reason for placing that quirk where it is now.
> > so i don't want to mess with it.
git blame is your friend:
The DELAY_INIT quirk only reduces the frequency of enumeration
failures with the Logitech HD Pro C920 and C930e webcams, but does
not quite eliminate them. We have found that adding a delay of 100ms
between the first and second Get Configuration request makes the
device enumerate perfectly reliable even after several weeks of
extensive testing. The reasons for that are anyone's guess,
> >
> > 2. Regarding my idea of adding a condition — so that it doesn't
> > change the behavior when the quirk isn't set — if the full
> > configuration set exceeds 255 bytes, we would have to issue a 2nd
> > request. In this case the existing behavior would be more justified.
> >
> > So, I'm a bit confused about how to implement this properly. Adding
> > yet another condition to fix the second case doesn't feel right to
> > me. It would look unnecessarily complicated. I would appreciate a
> > bit of help and advice.
>
> If the 255-byte quirk flag isn't set, do the delay before the second
> transfer just as it is now.
>
> If the 255-byte quirk flag is set, do the delay before the first
> transfer. If a second transfer is needed, you can do a second delay
> before it or not -- I suspect it doesn't matter. If you want to be
> safe, add the second delay.
How about "keep unrelated changes out of a stable patch", i.e. always
do the delay (if any) after the first request, regardless of size?
Regards,
Michal