From: Alan Stern <stern@rowland.harvard.edu>
To: Nikhil Solanke <nikhilsolanke5@gmail.com>
Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, michal.pecio@gmail.com,
corbet@lwn.net, skhan@linuxfoundation.org,
stable@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v4 1/2] usb: core: Add quirk for 255-bytes initial config read
Date: Mon, 27 Jul 2026 21:59:19 -0400 [thread overview]
Message-ID: <ba2af6f4-0134-4feb-addc-24694fabeb10@rowland.harvard.edu> (raw)
In-Reply-To: <20260727195434.14626-2-nikhilsolanke5@gmail.com>
On Tue, Jul 28, 2026 at 01:24:33AM +0530, Nikhil Solanke wrote:
> Certain third-party USB game controllers exposing (or spoofing) an Xbox
> 360-compatible interface (VID:PID 045e:028e) fail to enumerate under Linux.
> The device disconnects from the bus without responding to the initial
> GET_DESCRIPTOR(CONFIGURATION) request, and the kernel logs 'unable to read
> config index 0 descriptor/start: -71'.
>
> The device then falls back to a secondary Android HID mode (with a
> different VID:PID), losing XInput functionality including rumble support.
> The failure reproduces across multiple machines, host controller types, and
> kernel versions including current mainline and LTS. The device enumerates
> correctly and remains in XInput mode under Windows. Notably, the device
> enumerates correctly in Android mode when the same 9-byte request
> is issued for that mode's configuration descriptor, confirming the firmware
> bug is specific to the XInput mode.
>
> usbmon traces from Linux and Wireshark/USBPcap traces from Windows are
> identical up to the point of failure, with no visible protocol-level
> difference explaining the divergence. The root cause was identified when
> Michal Pecio discovered via a QEMU bus-level capture that Windows does not
> use wLength=9 for the initial config descriptor request; it uses
> wLength=255. Alan Stern subsequently confirmed this with a bus
> analyzer on a different USB 2.0 device, and Michal verified the behavior
> goes back to Windows 95 OSR2.1.
>
> So, add a new quirk flag USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE which causes
> usb_get_configuration() to issue a 255 byte sized configuration request
> instead of USB_DT_CONFIG_SIZE (9) for the initial
> GET_DESCRIPTOR(CONFIGURATION) request, mimicking long-standing Windows
> behavior.
>
> Suggested-by: Alan Stern <stern@rowland.harvard.edu>
> Suggested-by: Michal Pecio <michal.pecio@gmail.com>
> Closes: https://lore.kernel.org/linux-usb/CAFgddh+JWdT4LLwMc5qjM8q_pBu-fRo2qADR5ovAKoGHWMQrRw@mail.gmail.com/
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Nikhil Solanke <nikhilsolanke5@gmail.com>
> ---
Your patches basically looks fine to me. Just a couple of things to
note...
Personally, I prefer to see comments that don't extend beyond the
80-column limit. But there's no hard rule about this, it's just my own
preference -- you don't have to change anything if you don't want to.
Also, it's odd that you add the quirk flag to the kernel without adding
a new quirk entry for the Xbox 360-compatible devices. That doesn't
have to be done in this patch, though; it can be done in a follow-up.
(But note that without a followup this patch doesn't actually fix
anything, since a true fix would require user intervention.)
Finally, a really minor nit: The two patches in this series are
completely independent; either one can be applied without the other.
That means they don't really belong in a series, that is, they should be
submitted as two separate patches. Obviously that doesn't matter at all
in practice; it's just a matter of principle.
Anyway, for both patches 1 and 2:
Acked-by: Alan Stern <stern@rowland.harvard.edu>
If you want to rewrite and resubmit them along the lines mentioned
above, you can add my Acked-by to the new submissions.
Alan Stern
next prev parent reply other threads:[~2026-07-28 1:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 19:54 [PATCH v4 0/2] usb: core: Add quirk for 255-byte " Nikhil Solanke
2026-07-27 19:54 ` [PATCH v4 1/2] usb: core: Add quirk for 255-bytes " Nikhil Solanke
2026-07-28 1:59 ` Alan Stern [this message]
2026-07-28 8:07 ` Nikhil Solanke
2026-07-28 15:18 ` Alan Stern
2026-07-27 19:54 ` [PATCH v4 2/2] usb: hub: Split announce_device() to log device identity before enumeration 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=ba2af6f4-0134-4feb-addc-24694fabeb10@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--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=michal.pecio@gmail.com \
--cc=nikhilsolanke5@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.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®