Lines Matching refs:udev
586 bool usb_endpoint_is_ignored(struct usb_device *udev, in usb_endpoint_is_ignored() argument
594 if (!usb_match_device(udev, id)) in usb_endpoint_is_ignored()
597 if (!usb_match_one_id_intf(udev, intf, id)) in usb_endpoint_is_ignored()
608 static bool usb_match_any_interface(struct usb_device *udev, in usb_match_any_interface() argument
613 for (i = 0; i < udev->descriptor.bNumConfigurations; ++i) { in usb_match_any_interface()
614 struct usb_host_config *cfg = &udev->config[i]; in usb_match_any_interface()
626 if (usb_match_one_id_intf(udev, intf, id)) in usb_match_any_interface()
634 static int usb_amd_resume_quirk(struct usb_device *udev) in usb_amd_resume_quirk() argument
638 hcd = bus_to_hcd(udev->bus); in usb_amd_resume_quirk()
640 if (udev->level == 1 && hcd->amd_resume_bug == 1) in usb_amd_resume_quirk()
646 static u32 usb_detect_static_quirks(struct usb_device *udev, in usb_detect_static_quirks() argument
652 if (!usb_match_device(udev, id)) in usb_detect_static_quirks()
656 !usb_match_any_interface(udev, id)) in usb_detect_static_quirks()
665 static u32 usb_detect_dynamic_quirks(struct usb_device *udev) in usb_detect_dynamic_quirks() argument
667 u16 vid = le16_to_cpu(udev->descriptor.idVendor); in usb_detect_dynamic_quirks()
668 u16 pid = le16_to_cpu(udev->descriptor.idProduct); in usb_detect_dynamic_quirks()
688 void usb_detect_quirks(struct usb_device *udev) in usb_detect_quirks() argument
690 udev->quirks = usb_detect_static_quirks(udev, usb_quirk_list); in usb_detect_quirks()
696 if (usb_amd_resume_quirk(udev)) in usb_detect_quirks()
697 udev->quirks |= usb_detect_static_quirks(udev, in usb_detect_quirks()
700 udev->quirks ^= usb_detect_dynamic_quirks(udev); in usb_detect_quirks()
702 if (udev->quirks) in usb_detect_quirks()
703 dev_dbg(&udev->dev, "USB quirks for this device: %x\n", in usb_detect_quirks()
704 udev->quirks); in usb_detect_quirks()
707 if (!(udev->quirks & USB_QUIRK_RESET)) in usb_detect_quirks()
708 udev->persist_enabled = 1; in usb_detect_quirks()
711 if (udev->descriptor.bDeviceClass == USB_CLASS_HUB) in usb_detect_quirks()
712 udev->persist_enabled = 1; in usb_detect_quirks()
716 void usb_detect_interface_quirks(struct usb_device *udev) in usb_detect_interface_quirks() argument
720 quirks = usb_detect_static_quirks(udev, usb_interface_quirk_list); in usb_detect_interface_quirks()
724 dev_dbg(&udev->dev, "USB interface quirks for this device: %x\n", in usb_detect_interface_quirks()
726 udev->quirks |= quirks; in usb_detect_interface_quirks()