diff --git a/src/fu-usb-device.c b/src/fu-usb-device.c index 127d49429..996ef4459 100644 --- a/src/fu-usb-device.c +++ b/src/fu-usb-device.c @@ -228,6 +228,7 @@ fu_usb_device_probe (FuDevice *device, GError **error) g_autofree gchar *devid1 = NULL; g_autofree gchar *devid2 = NULL; g_autofree gchar *vendor_id = NULL; + g_autoptr(GPtrArray) intfs = NULL; /* set vendor ID */ vendor_id = g_strdup_printf ("USB:0x%04X", g_usb_device_get_vid (priv->usb_device)); @@ -255,6 +256,29 @@ fu_usb_device_probe (FuDevice *device, GError **error) g_usb_device_get_vid (priv->usb_device)); fu_device_add_guid (device, devid0); + /* add the interface GUIDs */ + intfs = g_usb_device_get_interfaces (priv->usb_device, error); + if (intfs == NULL) + return FALSE; + for (guint i = 0; i < intfs->len; i++) { + GUsbInterface *intf = g_ptr_array_index (intfs, i); + g_autofree gchar *intid1 = NULL; + g_autofree gchar *intid2 = NULL; + g_autofree gchar *intid3 = NULL; + intid1 = g_strdup_printf ("USB\\CLASS_%02X&SUBCLASS_%02X&PROT_%02X", + g_usb_interface_get_class (intf), + g_usb_interface_get_subclass (intf), + g_usb_interface_get_protocol (intf)); + fu_device_add_guid (device, intid1); + intid2 = g_strdup_printf ("USB\\CLASS_%02X&SUBCLASS_%02X", + g_usb_interface_get_class (intf), + g_usb_interface_get_subclass (intf)); + fu_device_add_guid (device, intid2); + intid3 = g_strdup_printf ("USB\\CLASS_%02X", + g_usb_interface_get_class (intf)); + fu_device_add_guid (device, intid3); + } + /* subclassed */ if (klass->probe != NULL) { if (!klass->probe (self, error))