Пример #1
0
/*
 * Detect any quirks the device has, and do any housekeeping for it if needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{
	udev->quirks = __usb_detect_quirks(udev, usb_quirk_list);

	/*
	 * Pixart-based mice would trigger remote wakeup issue on AMD
	 * Yangtze chipset, so set them as RESET_RESUME flag.
	 */
	if (usb_amd_resume_quirk(udev))
		udev->quirks |= __usb_detect_quirks(udev,
				usb_amd_resume_quirk_list);

	if (udev->quirks)
		dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
			udev->quirks);

#ifdef CONFIG_USB_DEFAULT_PERSIST
	if (!(udev->quirks & USB_QUIRK_RESET))
		udev->persist_enabled = 1;
#else
	/* Hubs are automatically enabled for USB-PERSIST */
	if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
		udev->persist_enabled = 1;
#endif	/* CONFIG_USB_DEFAULT_PERSIST */
}
Пример #2
0
void usb_detect_interface_quirks(struct usb_device *udev)
{
    u32 quirks;

    quirks = __usb_detect_quirks(udev, usb_interface_quirk_list);
    if (quirks == 0)
        return;

    dev_dbg(&udev->dev, "USB interface quirks for this device: %x\n",
            quirks);
    udev->quirks |= quirks;
}
Пример #3
0
/*
 * Detect any quirks the device has, and do any housekeeping for it if needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{
    udev->quirks = __usb_detect_quirks(udev, usb_quirk_list);
    if (udev->quirks)
        dev_dbg(&udev->dev, "USB quirks for this device: %x\n",
                udev->quirks);

#ifdef CONFIG_USB_DEFAULT_PERSIST
    if (!(udev->quirks & USB_QUIRK_RESET))
        udev->persist_enabled = 1;
#else
    /* Hubs are automatically enabled for USB-PERSIST */
    if (udev->descriptor.bDeviceClass == USB_CLASS_HUB)
        udev->persist_enabled = 1;
#endif	/* CONFIG_USB_DEFAULT_PERSIST */
}
Пример #4
0
/*
 * Detect any quirks the device has, and do any housekeeping for it if needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{
    udev->quirks = __usb_detect_quirks(udev, usb_quirk_list);
    if (udev->quirks)
        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)
        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))
        udev->persist_enabled = 1;
#endif	/* CONFIG_PM */
}