Hi Alan, On Tuesday 17 July 2012 10:47:39 Alan Stern wrote: > On Tue, 17 Jul 2012, Laurent Pinchart wrote: > > Most Logitech UVC webcams (both early models that don't advertise UVC > > compatibility and newer UVC-advertised devices) require the RESET_RESUME > > quirk. Instead of listing each and every model, match the devices based > > on the UVC interface information. > > > > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > > --- > > > > drivers/usb/core/quirks.c | 86 ++++++++++++--------------------------- > > 1 files changed, 24 insertions(+), 61 deletions(-) > > > > Alan, what do you think about this approach ? I'm not sure whether we need > > to include the early UVC models that advertise a vendor-specific class in > > the list. > > The general approach is okay. The details aren't quite right. > > Are the 0x08c2 - 0x08c7 products the ones with a vendor-specific class? Yes they are. > > @@ -153,31 +116,31 @@ static const struct usb_device_id usb_quirk_list[] = > > {> > > /* INTEL VALUE SSD */ > > { USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME }, > > > > + /* Logitech UVC Cameras */ > > + { .match_flags = USB_DEVICE_ID_MATCH_VENDOR > > + | USB_DEVICE_ID_MATCH_INT_INFO, > > + .idVendor = 0x046d, > > + .bInterfaceClass = USB_CLASS_VIDEO, > > + .bInterfaceSubClass = 1, > > + .bInterfaceProtocol = 0, > > + .driver_info = USB_QUIRK_RESET_RESUME }, > > + > > usb_match_device() doesn't pay attention to the MATCH_INT_INFO flag. > Therefore this entry would end up matching every Logitech device. > > In fact, at the time usb_detect_quirks() gets called we haven't yet > read in the device's config descriptors, so matching based on interface > info won't work. It looks like we need a second routine, > usb_detect_interface_quirks(), which would be called at the end of > usb_enumerate_device(), along with a second id table. OK, I'll implement that and resubmit. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html