diff options
| -rw-r--r-- | drivers/usb/host/xhci-pci.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 4a4cb1d91ac8..da10dc728acb 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/pci.h> | 23 | #include <linux/pci.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
| 26 | #include <linux/acpi.h> | ||
| 26 | 27 | ||
| 27 | #include "xhci.h" | 28 | #include "xhci.h" |
| 28 | #include "xhci-trace.h" | 29 | #include "xhci-trace.h" |
| @@ -190,6 +191,19 @@ static void xhci_pme_quirk(struct xhci_hcd *xhci) | |||
| 190 | readl(reg); | 191 | readl(reg); |
| 191 | } | 192 | } |
| 192 | 193 | ||
| 194 | #ifdef CONFIG_ACPI | ||
| 195 | static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) | ||
| 196 | { | ||
| 197 | static const u8 intel_dsm_uuid[] = { | ||
| 198 | 0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45, | ||
| 199 | 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23, | ||
| 200 | }; | ||
| 201 | acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1, NULL); | ||
| 202 | } | ||
| 203 | #else | ||
| 204 | static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) { } | ||
| 205 | #endif /* CONFIG_ACPI */ | ||
| 206 | |||
| 193 | /* called during probe() after chip reset completes */ | 207 | /* called during probe() after chip reset completes */ |
| 194 | static int xhci_pci_setup(struct usb_hcd *hcd) | 208 | static int xhci_pci_setup(struct usb_hcd *hcd) |
| 195 | { | 209 | { |
| @@ -263,6 +277,9 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 263 | HCC_MAX_PSA(xhci->hcc_params) >= 4) | 277 | HCC_MAX_PSA(xhci->hcc_params) >= 4) |
| 264 | xhci->shared_hcd->can_do_streams = 1; | 278 | xhci->shared_hcd->can_do_streams = 1; |
| 265 | 279 | ||
| 280 | if (xhci->quirks & XHCI_PME_STUCK_QUIRK) | ||
| 281 | xhci_pme_acpi_rtd3_enable(dev); | ||
| 282 | |||
| 266 | /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */ | 283 | /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */ |
| 267 | pm_runtime_put_noidle(&dev->dev); | 284 | pm_runtime_put_noidle(&dev->dev); |
| 268 | 285 | ||
