diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/xhci-pci.c | 8 | ||||
-rw-r--r-- | drivers/usb/host/xhci.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/xhci.h | 3 |
3 files changed, 13 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 1a30c380043c..cc24e39b97d5 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c | |||
@@ -221,6 +221,14 @@ static void xhci_pci_remove(struct pci_dev *dev) | |||
221 | static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) | 221 | static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) |
222 | { | 222 | { |
223 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); | 223 | struct xhci_hcd *xhci = hcd_to_xhci(hcd); |
224 | struct pci_dev *pdev = to_pci_dev(hcd->self.controller); | ||
225 | |||
226 | /* | ||
227 | * Systems with the TI redriver that loses port status change events | ||
228 | * need to have the registers polled during D3, so avoid D3cold. | ||
229 | */ | ||
230 | if (xhci_compliance_mode_recovery_timer_quirk_check()) | ||
231 | pdev->no_d3cold = true; | ||
224 | 232 | ||
225 | return xhci_suspend(xhci); | 233 | return xhci_suspend(xhci); |
226 | } | 234 | } |
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c index ae59119ed087..d8f640b12dd9 100644 --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c | |||
@@ -466,7 +466,7 @@ static void compliance_mode_recovery_timer_init(struct xhci_hcd *xhci) | |||
466 | * Systems: | 466 | * Systems: |
467 | * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820 | 467 | * Vendor: Hewlett-Packard -> System Models: Z420, Z620 and Z820 |
468 | */ | 468 | */ |
469 | static bool compliance_mode_recovery_timer_quirk_check(void) | 469 | bool xhci_compliance_mode_recovery_timer_quirk_check(void) |
470 | { | 470 | { |
471 | const char *dmi_product_name, *dmi_sys_vendor; | 471 | const char *dmi_product_name, *dmi_sys_vendor; |
472 | 472 | ||
@@ -517,7 +517,7 @@ int xhci_init(struct usb_hcd *hcd) | |||
517 | xhci_dbg(xhci, "Finished xhci_init\n"); | 517 | xhci_dbg(xhci, "Finished xhci_init\n"); |
518 | 518 | ||
519 | /* Initializing Compliance Mode Recovery Data If Needed */ | 519 | /* Initializing Compliance Mode Recovery Data If Needed */ |
520 | if (compliance_mode_recovery_timer_quirk_check()) { | 520 | if (xhci_compliance_mode_recovery_timer_quirk_check()) { |
521 | xhci->quirks |= XHCI_COMP_MODE_QUIRK; | 521 | xhci->quirks |= XHCI_COMP_MODE_QUIRK; |
522 | compliance_mode_recovery_timer_init(xhci); | 522 | compliance_mode_recovery_timer_init(xhci); |
523 | } | 523 | } |
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 29c978e37135..77600cefcaf1 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h | |||
@@ -1853,4 +1853,7 @@ struct xhci_input_control_ctx *xhci_get_input_control_ctx(struct xhci_hcd *xhci, | |||
1853 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); | 1853 | struct xhci_slot_ctx *xhci_get_slot_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx); |
1854 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); | 1854 | struct xhci_ep_ctx *xhci_get_ep_ctx(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, unsigned int ep_index); |
1855 | 1855 | ||
1856 | /* xHCI quirks */ | ||
1857 | bool xhci_compliance_mode_recovery_timer_quirk_check(void); | ||
1858 | |||
1856 | #endif /* __LINUX_XHCI_HCD_H */ | 1859 | #endif /* __LINUX_XHCI_HCD_H */ |