From: Muhammad Waleed Badar <walid.badar@gmail.com>
To: Hans de Goede <hansg@kernel.org>, Ricardo Ribalda <ribalda@chromium.org>
Cc: linux-media@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: uvcvideo: Handle payloads starting in the middle of a bulk URB
Date: Sun, 25 Oct 2026 22:08:41 +0500 [thread overview]
Message-ID: <20261025170841.46175-1-walid.badar@gmail.com> (raw)
In-Reply-To: <af1ff8d7-16a3-49ce-86ae-f944978f869b@kernel.org>
(Resending as plain text, the previous copy was rejected by the lists.)
Hi Ricardo, Hans,
On 12-Oct-26 15:04, Hans de Goede wrote:
> If I understand things correctly from the email thread + previous patch
> there is only 1 USB vid:pid combo which needs this.
>
> So although I'm normally in favor of heuristics over per device quirks
> I think in this case a device-quirk might make more sense ?
Thank you both for the review. Ricardo, you're right that v1 would
decode trailer data as a payload header and break those cameras.
In v2 I combined both suggestions:
- The URB is only split for devices with a new
UVC_QUIRK_BULK_UNALIGNED_PAYLOAD quirk, set for 0bda:579f only.
Everything else goes through the existing path unchanged.
- Even with the quirk, the remainder is only decoded as a new payload
if it looks like a UVC header (EOH set, bHeaderLength fits the data
and covers the PTS/SCR fields it announces). Otherwise the URB is
handled as before.
- A one-time "UVC non compliance" message is printed when the
workaround is used.
v2 is here, with test results on the affected camera:
https://lore.kernel.org/linux-media/20261025170220.42789-1-walid.badar@gmail.com/
Ricardo, Mauro: sorry, I left you off the v2 Cc by mistake.
Thanks,
Waleed
prev parent reply other threads:[~2026-10-25 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 16:52 Muhammad Waleed Badar
2026-10-12 1:54 ` Ricardo Ribalda
2026-10-12 13:04 ` Hans de Goede
2026-10-25 17:08 ` Muhammad Waleed Badar [this message]
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=20261025170841.46175-1-walid.badar@gmail.com \
--to=walid.badar@gmail.com \
--cc=hansg@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
/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
all inboxes | Powered by JetHome®