History

USB: cdc-acm - blacklist IMS PCU device

The IMS PCU (Passenger Control Unit) device used custom protocol over serial line, so it is presenting itself as CDC ACM device. Now that we have proper in-kernel driver for it we need to black-list the device in cdc-acm driver.

Dmitry Torokhov committed 13 years ago

Commit 16142651 parent 628329d2 files · +14 −0Browse files

Unified · Split

2 files
  1. drivers/usb/class/cdc-acm.c +13 −0
  2. drivers/usb/class/cdc-acm.h +1 −0
drivers/usb/class/cdc-acm.c+13−0
@@ -949,6 +949,10 @@ static int acm_probe(struct usb_interface *intf, · 948 unmodified lines
949949
950950 /* normal quirks */
951951 quirks = (unsigned long)id->driver_info;
952+
953+ if (quirks == IGNORE_DEVICE)
954+ return -ENODEV;
955+
952956 num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
953957
954958 /* handle quirks deadly to normal probing*/
@@ -1650,6 +1654,15 @@ static const struct usb_device_id acm_ids[] = { · 695 unmodified lines
16501654 .driver_info = NO_DATA_INTERFACE,
16511655 },
16521656
1657+#if IS_ENABLED(CONFIG_INPUT_IMS_PCU)
1658+ { USB_DEVICE(0x04d8, 0x0082), /* Application mode */
1659+ .driver_info = IGNORE_DEVICE,
1660+ },
1661+ { USB_DEVICE(0x04d8, 0x0083), /* Bootloader mode */
1662+ .driver_info = IGNORE_DEVICE,
1663+ },
1664+#endif
1665+
16531666 /* control interfaces without any protocol set */
16541667 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
16551668 USB_CDC_PROTO_NONE) },
drivers/usb/class/cdc-acm.h+1−0
@@ -128,3 +128,4 @@ struct acm { · 127 unmodified lines
128128 #define NO_CAP_LINE 4
129129 #define NOT_A_MODEM 8
130130 #define NO_DATA_INTERFACE 16
131+#define IGNORE_DEVICE 32

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t