All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix initialization and routing for Generic Clone X-Input Gamepads
@ 2026-07-26 13:20 Ishaan Dandekar
  2026-07-26 13:20 ` [PATCH 1/3] usbcore: Add quirk for 255-bytes initial config read Ishaan Dandekar
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ishaan Dandekar @ 2026-07-26 13:20 UTC (permalink / raw)
  To: linux-input, linux-usb; +Cc: gregkh, nikhilsolanke5, Ishaan Dandekar

This patch series fixes a two-stage failure preventing certain generic X-Input clone controllers (specifically 0283:0001) from functioning  correctly in Linux. The primary motivation for this series is to restore full device functionality, specifically haptic feedback (rumble), which is entirely lost when the device falls back to its limited Android mode.

Phase 1: The Hardware Panic (USB Core layer)
When the controller is plugged in, the USB core requests its configuration using a 9-byte request. The controller's firmware fails, disconnects, and shape-shifts into a fallback Android mode, completely losing its X-Input capabilities.
Patch 1 (by Nikhil Solanke) builds the underlying core logic to allow a 255-byte config request (mimicking Windows behavior).
Patch 2 (my contribution) adds this specific controller's hardware ID to Nikhil's new quirk list, preventing the crash and locking it in X-Input mode.

Phase 2: The Software Blind Spot (Input/xpad layer)
Because Phase 1 succeeds, the controller stays in X-Input mode and presents the hardware ID 0283:0001. However, the xpad driver lacked this ID in its internal device tables. Because it wasn't recognized as an official Xbox controller, the kernel handed it to hid-generic, which only initialized the keyboard interface, resulting in ignored gamepad inputs and total loss of rumble.
Patch 3 explicitly adds 0283:0001 to the xpad routing filters so it initializes as a proper gamepad with full haptic support.

I initially attempted to send just the quirk patch, but realized the device remained non-functional as a gamepad without the xpad routing fix. This series unites both fixes to ensure the hardware is actually usable out of the box.

(Note: My previous single-patch submission was corrupted by my email client's formatting; this series replaces it and is being submitted via git send-email).

Ishaan Dandekar (2):
  usb: quirks: Add ShanWan gamepad to quirk list
  Input: xpad - add support for generic clone X-Input gamepads

Nikhil Solanke (1):
  usbcore: Add quirk for 255-bytes initial config read

 .../admin-guide/kernel-parameters.txt         | 10 +++++
 drivers/input/joystick/xpad.c                 |  2 +
 drivers/usb/core/config.c                     | 39 +++++++++++++++----
 drivers/usb/core/quirks.c                     |  7 ++++
 include/linux/usb/quirks.h                    |  3 ++
 5 files changed, 54 insertions(+), 7 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-07-26 13:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 13:20 [PATCH 0/3] Fix initialization and routing for Generic Clone X-Input Gamepads Ishaan Dandekar
2026-07-26 13:20 ` [PATCH 1/3] usbcore: Add quirk for 255-bytes initial config read Ishaan Dandekar
2026-07-26 13:28   ` Greg KH
2026-07-26 13:20 ` [PATCH 2/3] usb: quirks: Add ShanWan gamepad to quirk list Ishaan Dandekar
2026-07-26 13:29   ` Greg KH
2026-07-26 13:20 ` [PATCH 3/3] Input: xpad - add support for generic clone X-Input gamepads Ishaan Dandekar
2026-07-26 13:29   ` Greg KH
2026-07-26 13:33   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.