From: Nicolai Buchwitz <nb@tipi-net.de>
To: Michal Pecio <michal.pecio@gmail.com>,
Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: Relax high-speed bulk max packet size rules
Date: Wed, 28 Oct 2026 20:23:05 +0100 [thread overview]
Message-ID: <28a80e7bc00ef3a30b841142ecd08cf4908fc6a8.camel@tipi-net.de> (raw)
In-Reply-To: <20261028104329.3d1c8029.michal.pecio@gmail.com>
Hi Michal
On Wed, 2026-10-28 at 10:43 +0100, Michal Pecio wrote:
> Nicolai reported multiple dodgy high-speed devices still being made
> which declare out-of-spec bulk wMaxPacketSize and actually require
> the host to use it for correct operation. Apparently, Windows copies
> this field to the EP Context verbatim and other Linux HCDs like EHCI
> and DWC2 do similar things for compatibility's sake.
Thanks for picking this up!
>
> We are also aware of devices like astronomical cameras which use 1KB
> to reduce protocol overhead, and audio devices with MIDI endpoints
> that specify unusual MPS like 8 or 4 (the latter was full-speed) and
> work with larger sizes just fine because they never do multi-packet
> transfers where MPS really matters.
>
> I found that sensible (power of two, 8 - 512) MPS are usable on many
> xHCI controllers from vendors like AMD, ASMedia, Fresco, NEC/Renesas,
> and VIA. Nicolai also tested two Raspberry Pi SBCs and a modern Intel
> machine running Windows 11 and 64B endpoints worked.
>
> OTOH, Etron rejects Configure Endpoint if MPS != 512. For such cases,
> commit e4f47e3675e6 ("USB: xHCI: override bogus bulk wMaxPacketSize
> values") sets HS bulk MPS to 512, which obviously breaks those dodgy
> devices that perform multi-packet transfers with other size.
>
> Problematic devices known so far use power of two MPS of at least 64,
> so try to recognize them with this heuristic. Non power of two or
> small MPS seems to indicate a clueless device which treats bulk like
> interrupt and specifies intended transfer size; we will use standard
> MPS here to avoid trouble with potential other HCs like Etron.
>
> Reported-by: Nicolai Buchwitz <nb@tipi-net.de>
> Closes:
> https://lore.kernel.org/linux-usb/20261020-fix-usbtmc-short-packets-v1-0-903f4d029193@tipi-net.de/
> Link:
> https://lore.kernel.org/linux-usb/93d5aeb4-f1c7-9342-7bc5-4b277b4ec55e@veikia.lt/
> Link:
> https://lore.kernel.org/alsa-devel/CAE-xCyPhrS6pgY0T9SG0TCubSi0CE2Yd5H=ttOzBmvgrR8fTPA@mail.gmail.com/
> Link:
> https://lore.kernel.org/linux-usb/348c50de-f922-8295-ef87-cf5cdea5c7f4@gmail.com/
> Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
> ---
> [...]
I ran the patch on a Raspberry Pi CM4S with a Rigol DP832A.
Multi-packet replies up to ~1 KB and writes up to 760 bytes
work fine. dmesg doesn't show anything suspicious.
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Tested-by: Nicolai Buchwitz <nb@tipi-net.de> # BCM2711 in XHCI mode
Regards,
Nicolai
--
Nicolai Buchwitz <nb@tipi-net.de>
prev parent reply other threads:[~2026-10-28 19:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 9:43 Michal Pecio
2026-10-28 19:23 ` Nicolai Buchwitz [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=28a80e7bc00ef3a30b841142ecd08cf4908fc6a8.camel@tipi-net.de \
--to=nb@tipi-net.de \
--cc=gregkh@linuxfoundation.org \
--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 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®