From: Michal Pecio <michal.pecio@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Nikhil Solanke <nikhilsolanke5@gmail.com>,
linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org,
corbet@lwn.net, skhan@linuxfoundation.org,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2] usbcore: Add quirk for 255-bytes initial config read
Date: Sun, 28 Jun 2026 22:41:50 +0200 [thread overview]
Message-ID: <20260628224150.39990d04.michal.pecio@gmail.com> (raw)
In-Reply-To: <8f5bb295-fc1b-4698-8f2f-2d40fb4d9f93@rowland.harvard.edu>
On Sun, 28 Jun 2026 15:18:02 -0400, Alan Stern wrote:
> On Sun, Jun 28, 2026 at 07:02:01PM +0200, Michal Pecio wrote:
> > If such devices will exist, then it probably won't matter whether
> > the delay comes after or before the first request. Purpose isn't
> > known, but it appears to be rate limiting configuration descriptor
> > requests or delaying other requests after this function returns.
>
> In fact, the commit that talks about the Logitech webcams does
> describe their buggy behavior to some extent. It says that they seem
> to reply with stale video data instead of the real config
> information, and from there it's a short guess that adding a delay
> gives time for the video pipeline to drain or time out.
>
> In addition, the fact that the delay is needed after the first
> request but before the second suggests that the data corruption only
> affects transfers longer than 9 bytes -- which the new first request
> would be. Therefore it would be appropriate to have the delay before
> the new first request. Whether another delay would be needed before
> the second request (if there is one) is unknown.
Fair enough, that's possible, but even in these specific webcams it's
still unclear what delays would be necessary with both quirks. We wait
for the HW to complete something, but we don't know what starts it. If
it's device reset, then b2a542bbb308 has already doubled all delays
so d86db25e53fa6 isn't even necessary anymore. OTOH, if it's the first
config request, then a delay between the requests is mandatory, and
a delay before the first request is useless. If it's something in
between then your approach could be the only viable choice.
I would worry about it when a device is known that uses both quirks.
> Good point. But I dislike messages that actively produce wrong
> information. Nikhil could get rid of the parts of the log messages
> you don't like, but he shouldn't leave them as they are. He could
> even do that in a second patch, separate from this one.
I can agree that the first "descriptor too short" message becomes
misleading, because we no longer expect 9 bytes exactly, but anything
between 9 and 255. So this could be changed to "requested".
But I see no need to change the second message. Regardless of initial
request length, the next request (if any) asks for the exact size and
we do expect it to produce 'length' bytes.
Using different words in these messages has a beneficial side effect
of making it possible to tell them apart when wTotalLength == 9.
Regards,
Michal
next prev parent reply other threads:[~2026-06-28 20:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 16:10 [PATCH v2] usbcore: Add quirk for 255-bytes initial config read Nikhil Solanke
2026-06-23 18:35 ` Randy Dunlap
2026-06-23 19:08 ` Nikhil Solanke
2026-06-23 20:24 ` Alan Stern
2026-06-23 21:14 ` Nikhil Solanke
2026-06-24 1:35 ` Alan Stern
2026-06-24 8:06 ` Nikhil Solanke
2026-06-24 14:00 ` Alan Stern
2026-06-28 6:23 ` Nikhil Solanke
2026-06-28 13:55 ` Alan Stern
2026-06-28 14:50 ` Michal Pecio
2026-06-28 15:48 ` Alan Stern
2026-06-28 17:02 ` Michal Pecio
2026-06-28 17:22 ` Michal Pecio
2026-06-28 19:18 ` Alan Stern
2026-06-28 20:41 ` Michal Pecio [this message]
2026-06-28 16:38 ` Nikhil Solanke
2026-06-28 16:31 ` Nikhil Solanke
2026-06-28 19:21 ` Alan Stern
2026-06-25 13:56 ` Greg KH
2026-06-28 21:16 ` Michal Pecio
2026-06-29 5:30 ` Nikhil Solanke
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=20260628224150.39990d04.michal.pecio@gmail.com \
--to=michal.pecio@gmail.com \
--cc=corbet@lwn.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nikhilsolanke5@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=stable@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