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-10-02 00:39:32 +0200 |
commit | 07e6a7ea18404f243ac943985fae15a55bf89344 (patch) | |
tree | 92461d626a07ee7d86ec828da82399dbb4085e29 /drivers/net/can/usb/ucan.c | |
parent | 5c237541fab8dd61be61314154b4e88ebbd8cd7f (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>
Diffstat (limited to 'drivers/net/can/usb/ucan.c')
-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 */ }; |