Skip to content

Commit 1614265

Browse files
committed
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. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 628329d commit 1614265

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

drivers/usb/class/cdc-acm.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,10 @@ static int acm_probe(struct usb_interface *intf,
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[] = {
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,4 @@ struct acm {
128128
#define NO_CAP_LINE 4
129129
#define NOT_A_MODEM 8
130130
#define NO_DATA_INTERFACE 16
131+
#define IGNORE_DEVICE 32

0 commit comments

Comments
 (0)