diff options
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index cbc4d491e626..c408e9f6a707 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -118,6 +118,12 @@ static int xhci_pci_setup(struct usb_hcd *hcd) | |||
118 | /* AMD PLL quirk */ | 118 | /* AMD PLL quirk */ |
119 | if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info()) | 119 | if (pdev->vendor == PCI_VENDOR_ID_AMD && usb_amd_find_chipset_info()) |
120 | xhci->quirks |= XHCI_AMD_PLL_FIX; | 120 | xhci->quirks |= XHCI_AMD_PLL_FIX; |
121 | if (pdev->vendor == PCI_VENDOR_ID_INTEL && | ||
122 | pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) { | ||
123 | xhci->quirks |= XHCI_SPURIOUS_SUCCESS; | ||
124 | xhci->quirks |= XHCI_EP_LIMIT_QUIRK; | ||
125 | xhci->limit_active_eps = 64; | ||
126 | } | ||
121 | 127 | ||
122 | /* Make sure the HC is halted. */ | 128 | /* Make sure the HC is halted. */ |
123 | retval = xhci_halt(xhci); | 129 | retval = xhci_halt(xhci); |
@@ -242,8 +248,28 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) | |||
242 | static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated) | 248 | static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated) |
243 | { | 249 | { |
244 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 250 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
251 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | ||
245 | int retval = 0; | 252 | int retval = 0; |
246 | 253 | ||
254 | /* The BIOS on systems with the Intel Panther Point chipset may or may | ||
255 | * not support xHCI natively. That means that during system resume, it | ||
256 | * may switch the ports back to EHCI so that users can use their | ||
257 | * keyboard to select a kernel from GRUB after resume from hibernate. | ||
258 | * | ||
259 | * The BIOS is supposed to remember whether the OS had xHCI ports | ||
260 | * enabled before resume, and switch the ports back to xHCI when the | ||
261 | * BIOS/OS semaphore is written, but we all know we can't trust BIOS | ||
262 | * writers. | ||
263 | * | ||
264 | * Unconditionally switch the ports back to xHCI after a system resume. | ||
265 | * We can't tell whether the EHCI or xHCI controller will be resumed | ||
266 | * first, so we have to do the port switchover in both drivers. Writing | ||
267 | * a '1' to the port switchover registers should have no effect if the | ||
268 | * port was already switched over. | ||
269 | */ | ||
270 | if (usb_is_intel_switchable_xhci(pdev)) | ||
271 | usb_enable_xhci_ports(pdev); | ||
272 | |||
247 | retval = xhci_resume(xhci, hibernated); | 273 | retval = xhci_resume(xhci, hibernated); |
248 | return retval; | 274 | return retval; |
249 | } | 275 | } |