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
949 949
950 /* normal quirks */950 /* normal quirks */
951 quirks = (unsigned long)id->driver_info;951 quirks = (unsigned long)id->driver_info;
952
953 if (quirks == IGNORE_DEVICE)
954 return -ENODEV;
955
952 num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;956 num_rx_buf = (quirks == SINGLE_RX_URB) ? 1 : ACM_NR;
953 957
954 /* handle quirks deadly to normal probing*/958 /* handle quirks deadly to normal probing*/
@@ -1650,6 +1654,15 @@ static const struct usb_device_id acm_ids[] = { · 695 unmodified lines
1650 .driver_info = NO_DATA_INTERFACE,1654 .driver_info = NO_DATA_INTERFACE,
1651 },1655 },
1652 1656
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
1653 /* control interfaces without any protocol set */1666 /* control interfaces without any protocol set */
1654 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,1667 { USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
1655 USB_CDC_PROTO_NONE) },1668 USB_CDC_PROTO_NONE) },
drivers/usb/class/cdc-acm.h+1−0
@@ -128,3 +128,4 @@ struct acm { · 127 unmodified lines
128#define NO_CAP_LINE 4128#define NO_CAP_LINE 4
129#define NOT_A_MODEM 8129#define NOT_A_MODEM 8
130#define NO_DATA_INTERFACE 16130#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