diff options
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index c2d495057eb5..b8dffd59eb25 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -35,6 +35,9 @@ | |||
35 | #define PCI_VENDOR_ID_ETRON 0x1b6f | 35 | #define PCI_VENDOR_ID_ETRON 0x1b6f |
36 | #define PCI_DEVICE_ID_ASROCK_P67 0x7023 | 36 | #define PCI_DEVICE_ID_ASROCK_P67 0x7023 |
37 | 37 | ||
38 | #define PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI 0x8c31 | ||
39 | #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI 0x9c31 | ||
40 | |||
38 | static const char hcd_name[] = "xhci_hcd"; | 41 | static const char hcd_name[] = "xhci_hcd"; |
39 | 42 | ||
40 | /* called after powerup, by probe or system-pm "wakeup" */ | 43 | /* called after powerup, by probe or system-pm "wakeup" */ |
@@ -69,6 +72,14 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
69 | "QUIRK: Fresco Logic xHC needs configure" | 72 | "QUIRK: Fresco Logic xHC needs configure" |
70 | " endpoint cmd after reset endpoint"); | 73 | " endpoint cmd after reset endpoint"); |
71 | } | 74 | } |
75 | if (pdev->device == PCI_DEVICE_ID_FRESCO_LOGIC_PDK && | ||
76 | pdev->revision == 0x4) { | ||
77 | xhci->quirks |= XHCI_SLOW_SUSPEND; | ||
78 | xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, | ||
79 | "QUIRK: Fresco Logic xHC revision %u" | ||
80 | "must be suspended extra slowly", | ||
81 | pdev->revision); | ||
82 | } | ||
72 | /* Fresco Logic confirms: all revisions of this chip do not | 83 | /* Fresco Logic confirms: all revisions of this chip do not |
73 | * support MSI, even though some of them claim to in their PCI | 84 | * support MSI, even though some of them claim to in their PCI |
74 | * capabilities. | 85 | * capabilities. |
@@ -110,6 +121,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) | |||
110 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; | 121 | xhci->quirks |= XHCI_SPURIOUS_REBOOT; |
111 | xhci->quirks |= XHCI_AVOID_BEI; | 122 | xhci->quirks |= XHCI_AVOID_BEI; |
112 | } | 123 | } |
124 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | ||
125 | (pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_XHCI || | ||
126 | pdev->device == PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_XHCI)) { | ||
127 | /* Workaround for occasional spurious wakeups from S5 (or | ||
128 | * any other sleep) on Haswell machines with LPT and LPT-LP | ||
129 | * with the new Intel BIOS | ||
130 | */ | ||
131 | xhci->quirks |= XHCI_SPURIOUS_WAKEUP; | ||
132 | } | ||
113 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && | 133 | if (pdev->vendor == PCI_VENDOR_ID_ETRON && |
114 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { | 134 | pdev->device == PCI_DEVICE_ID_ASROCK_P67) { |
115 | xhci->quirks |= XHCI_RESET_ON_RESUME; | 135 | xhci->quirks |= XHCI_RESET_ON_RESUME; |
@@ -217,6 +237,11 @@ static void xhci_pci_remove(struct pci_dev *dev) | |||
217 | usb_put_hcd(xhci->shared_hcd); | 237 | usb_put_hcd(xhci->shared_hcd); |
218 | } | 238 | } |
219 | usb_hcd_pci_remove(dev); | 239 | usb_hcd_pci_remove(dev); |
240 | |||
241 | /* Workaround for spurious wakeups at shutdown with HSW */ | ||
242 | if (xhci->quirks & XHCI_SPURIOUS_WAKEUP) | ||
243 | pci_set_power_state(dev, PCI_D3hot); | ||
244 | |||
220 | kfree(xhci); | 245 | kfree(xhci); |
221 | } | 246 | } |
222 | 247 | ||
@@ -351,7 +376,7 @@ static struct pci_driver xhci_pci_driver = { | |||
351 | /* suspend and resume implemented later */ | 376 | /* suspend and resume implemented later */ |
352 | 377 | ||
353 | .shutdown = usb_hcd_pci_shutdown, | 378 | .shutdown = usb_hcd_pci_shutdown, |
354 | #ifdef CONFIG_PM_SLEEP | 379 | #ifdef CONFIG_PM |
355 | .driver = { | 380 | .driver = { |
356 | .pm = &usb_hcd_pci_pm_ops | 381 | .pm = &usb_hcd_pci_pm_ops |
357 | }, | 382 | }, |