summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Muellner <christoph.muellner@theobroma-systems.com>2019-04-02 16:48:47 +0200
committerChristoph Muellner <christoph.muellner@theobroma-systems.com>2019-04-02 19:16:04 +0200
commit48c52730744342b551af1081f2c9d791e95a2524 (patch)
treef778be8092c1529e1a5bbbf231aa289f3a777f62
parent72e1a97697d81b276d4ab0eec657a7a520558bf8 (diff)
ucan: Add version matching to enumerate only v3.0+ devices.
This patch extends the USB device ID table of the ucan driver to match for the device version as well. Only devices with a firmware version of 3.0 or higher will match. Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
-rw-r--r--drivers/net/can/usb/ucan.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index 7c5b1284aa94..761c558d0f81 100644
--- a/drivers/net/can/usb/ucan.c
+++ b/drivers/net/can/usb/ucan.c
@@ -1582,10 +1582,26 @@ static void ucan_disconnect(struct usb_interface *intf)
}
static struct usb_device_id ucan_table[] = {
- /* Mule (soldered onto compute modules) */
- {USB_DEVICE_INTERFACE_NUMBER(0x2294, 0x425a, 0)},
- /* Seal (standalone USB stick) */
- {USB_DEVICE_INTERFACE_NUMBER(0x2294, 0x425b, 0)},
+ {
+ /* Mule (soldered onto compute modules) */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
+ USB_DEVICE_ID_MATCH_INT_NUMBER,
+ .idVendor = 0x2294,
+ .idProduct = 0x425a,
+ .bInterfaceNumber = 0,
+ .bcdDevice_lo = 0x0300,
+ .bcdDevice_hi = 0xffff
+ },
+ {
+ /* Seal (standalone USB stick) */
+ .match_flags = USB_DEVICE_ID_MATCH_DEVICE_AND_VERSION |
+ USB_DEVICE_ID_MATCH_INT_NUMBER,
+ .idVendor = 0x2294,
+ .idProduct = 0x425b,
+ .bInterfaceNumber = 0,
+ .bcdDevice_lo = 0x0300,
+ .bcdDevice_hi = 0xffff
+ },
{} /* Terminating entry */
};