aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2013-02-02 14:02:14 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-03-12 11:50:23 -0400
commit16142655269aaf580488e074eabfdcf0fb4e3687 (patch)
treefbcb8b9dcb5820b5b067658aadea327c3684bf1b /drivers/usb
parent628329d52474323938a03826941e166bc7c8eff4 (diff)
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/class/cdc-acm.c13
-rw-r--r--drivers/usb/class/cdc-acm.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index 6e49ec6f3adc..278bf5256a95 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -949,6 +949,10 @@ static int acm_probe(struct usb_interface *intf,
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[] = {
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) },
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 35ef887b7417..0f76e4af600e 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -128,3 +128,4 @@ struct acm {
128#define NO_CAP_LINE 4 128#define NO_CAP_LINE 4
129#define NOT_A_MODEM 8 129#define NOT_A_MODEM 8
130#define NO_DATA_INTERFACE 16 130#define NO_DATA_INTERFACE 16
131#define IGNORE_DEVICE 32