From 3866fc44de7afcc5241c79f06c6e87446e97adb2 Mon Sep 17 00:00:00 2001 From: Christoph Muellner Date: Tue, 2 Apr 2019 16:48:47 +0200 Subject: 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 --- drivers/net/can/usb/ucan.c | 24 ++++++++++++++++++++---- 1 file 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 */ }; -- cgit v1.2.3