[PATCH 0/2] usbcore: Add quirk for 255-byte initial config read

Nikhil Solanke posted 2 patches 1 week ago
.../admin-guide/kernel-parameters.txt         | 10 +++++
drivers/usb/core/config.c                     | 39 +++++++++++++++----
drivers/usb/core/hub.c                        | 16 ++++++--
drivers/usb/core/quirks.c                     |  4 ++
include/linux/usb/quirks.h                    |  3 ++
5 files changed, 61 insertions(+), 11 deletions(-)
[PATCH 0/2] usbcore: Add quirk for 255-byte initial config read
Posted by Nikhil Solanke 1 week ago
This series adds a quirk for USB devices that fail enumeration when
the initial GET_DESCRIPTOR(CONFIGURATION) request uses wLength=9.

Patch 1 adds USB_QUIRK_WINDOWS_CONFIG_REQ_SIZE which causes
usb_get_configuration() to use wLength=255 for the initial config
descriptor request, mirroring long-standing Windows behavior.

Patch 2 splits announce_device() to log device identity before
enumeration, improving failure diagnosis.

Nikhil Solanke (2):
  usbcore: Add quirk for 255-bytes initial config read
  USB: hub: Split announce_device() to log device identity before
    enumeration

 .../admin-guide/kernel-parameters.txt         | 10 +++++
 drivers/usb/core/config.c                     | 39 +++++++++++++++----
 drivers/usb/core/hub.c                        | 16 ++++++--
 drivers/usb/core/quirks.c                     |  4 ++
 include/linux/usb/quirks.h                    |  3 ++
 5 files changed, 61 insertions(+), 11 deletions(-)

-- 
2.55.0
Re: [PATCH 0/2] usbcore: Add quirk for 255-byte initial config read
Posted by Nikhil Solanke 6 days, 22 hours ago
Sorry, forgot to mark this as v3. This should be [PATCH v3 0/2].

Changes from v2:
- put strings in a single line
- copy bytes from desc to bigbuffer instead of pointer aliasing.
- change tabs to spaces in documentation
- reworded some comments
- drop USB_CONFIG_WINDOWS_REQ_SIZE macro
- revert USB_DELAY_INIT to original behavior. no delay before 1st request.
- split announce_device() so we can report device ids early before
vendor strings

Thanks,
Nikhil Solanke