UPSTREAM: usb: Make USB persist default configurable
[cascardo/linux.git] / drivers / usb / core / quirks.c
index ecf12e1..99e61e9 100644 (file)
@@ -117,9 +117,12 @@ static const struct usb_device_id usb_quirk_list[] = {
        { USB_DEVICE(0x06a3, 0x0006), .driver_info =
                        USB_QUIRK_CONFIG_INTF_STRINGS },
 
-       /* Guillemot Webcam Hercules Dualpix Exchange*/
+       /* Guillemot Webcam Hercules Dualpix Exchange (2nd ID) */
        { USB_DEVICE(0x06f8, 0x0804), .driver_info = USB_QUIRK_RESET_RESUME },
 
+       /* Guillemot Webcam Hercules Dualpix Exchange*/
+       { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME },
+
        /* M-Systems Flash Disk Pioneers */
        { USB_DEVICE(0x08ec, 0x1000), .driver_info = USB_QUIRK_RESET_RESUME },
 
@@ -176,18 +179,12 @@ void usb_detect_quirks(struct usb_device *udev)
                dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
                                udev->quirks);
 
-       /* For the present, all devices default to USB-PERSIST enabled */
-#if 0          /* was: #ifdef CONFIG_PM */
-       /* Hubs are automatically enabled for USB-PERSIST */
-       if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
+#ifdef CONFIG_USB_DEFAULT_PERSIST
+       if (!(udev->quirks & USB_QUIRK_RESET_MORPHS))
                udev->persist_enabled = 1;
-
 #else
-       /* In the absence of PM, we can safely enable USB-PERSIST
-        * for all devices.  It will affect things like hub resets
-        * and EMF-related port disables.
-        */
-       if (!(udev->quirks & USB_QUIRK_RESET_MORPHS))
+       /* Hubs are automatically enabled for USB-PERSIST */
+       if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
                udev->persist_enabled = 1;
-#endif /* CONFIG_PM */
+#endif /* CONFIG_USB_DEFAULT_PERSIST */
 }