2 --- a/drivers/usb/host/pci-quirks.c
3 +++ b/drivers/usb/host/pci-quirks.c
5 #define USB_INTEL_USB3_PSSEN 0xD8
6 #define USB_INTEL_USB3PRM 0xDC
8 +#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
10 static struct amd_chipset_info {
11 struct pci_dev *nb_dev;
12 struct pci_dev *smbus_dev;
13 @@ -366,6 +368,10 @@ void usb_amd_dev_put(void)
15 EXPORT_SYMBOL_GPL(usb_amd_dev_put);
17 +#endif /* CONFIG_PCI_DISABLE_COMMON_QUIRKS */
19 +#if IS_ENABLED(CONFIG_USB_UHCI_HCD)
22 * Make sure the controller is completely inactive, unable to
23 * generate interrupts or do DMA.
24 @@ -445,8 +451,17 @@ reset_needed:
25 uhci_reset_hc(pdev, base);
29 +int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base)
35 EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc);
37 +#ifndef CONFIG_PCI_DISABLE_COMMON_QUIRKS
39 static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
42 @@ -975,3 +990,4 @@ static void quirk_usb_early_handoff(stru
44 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
45 PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
47 --- a/drivers/usb/host/pci-quirks.h
48 +++ b/drivers/usb/host/pci-quirks.h
51 void uhci_reset_hc(struct pci_dev *pdev, unsigned long base);
52 int uhci_check_and_reset_hc(struct pci_dev *pdev, unsigned long base);
53 +#endif /* CONFIG_PCI */
55 +#if defined(CONFIG_PCI) && !defined(CONFIG_PCI_DISABLE_COMMON_QUIRKS)
56 int usb_amd_find_chipset_info(void);
57 void usb_amd_dev_put(void);
58 void usb_amd_quirk_pll_disable(void);
59 @@ -13,11 +16,16 @@ void usb_disable_xhci_ports(struct pci_d
60 void sb800_prefetch(struct device *dev, int on);
63 +static inline int usb_amd_find_chipset_info(void)
67 static inline void usb_amd_quirk_pll_disable(void) {}
68 static inline void usb_amd_quirk_pll_enable(void) {}
69 static inline void usb_amd_dev_put(void) {}
70 static inline void usb_disable_xhci_ports(struct pci_dev *xhci_pdev) {}
71 static inline void sb800_prefetch(struct device *dev, int on) {}
72 -#endif /* CONFIG_PCI */
73 +static inline void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev) {}
76 #endif /* __LINUX_USB_PCI_QUIRKS_H */