Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cdc-acm: new quirk for EPSON HMD

This device has a union descriptor that is just garbage
and needs a custom descriptor.
In principle this could be done with a (conditionally
activated) heuristic. That would match more devices
without a need for defining a new quirk. However,
this always carries the risk that the heuristics
does the wrong thing and leads to more breakage.
Defining the quirk and telling it exactly what to do
is the safe and conservative approach.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20260317084139.1461008-1-oneukum@suse.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Oliver Neukum and committed by
Greg Kroah-Hartman
f97e96c3 b2f6648c

+10
+9
drivers/usb/class/cdc-acm.c
··· 1225 1225 if (!data_interface || !control_interface) 1226 1226 return -ENODEV; 1227 1227 goto skip_normal_probe; 1228 + } else if (quirks == NO_UNION_12) { 1229 + data_interface = usb_ifnum_to_if(usb_dev, 2); 1230 + control_interface = usb_ifnum_to_if(usb_dev, 1); 1231 + if (!data_interface || !control_interface) 1232 + return -ENODEV; 1233 + goto skip_normal_probe; 1228 1234 } 1229 1235 1230 1236 /* normal probing*/ ··· 1753 1747 }, 1754 1748 { USB_DEVICE(0x045b, 0x024D), /* Renesas R-Car E3 USB Download mode */ 1755 1749 .driver_info = DISABLE_ECHO, /* Don't echo banner */ 1750 + }, 1751 + { USB_DEVICE(0x04b8, 0x0d12), /* EPSON HMD Com&Sens */ 1752 + .driver_info = NO_UNION_12, /* union descriptor is garbage */ 1756 1753 }, 1757 1754 { USB_DEVICE(0x0e8d, 0x0003), /* FIREFLY, MediaTek Inc; andrey.arapov@gmail.com */ 1758 1755 .driver_info = NO_UNION_NORMAL, /* has no union descriptor */
+1
drivers/usb/class/cdc-acm.h
··· 114 114 #define SEND_ZERO_PACKET BIT(6) 115 115 #define DISABLE_ECHO BIT(7) 116 116 #define MISSING_CAP_BRK BIT(8) 117 + #define NO_UNION_12 BIT(9)