diff options
author | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-04-02 16:48:47 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2019-04-30 20:02:05 +0200 |
commit | 3866fc44de7afcc5241c79f06c6e87446e97adb2 (patch) | |
tree | a348a8265f87136115637aabe4a5819227b9ab44 | |
parent | 2044b635ff7c76499ec061793a7b7bb8639705cb (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.c | 24 |
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 */ }; |