aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 2b8d9a24af09..7436d5f5e67a 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -936,7 +936,7 @@ int xhci_suspend(struct xhci_hcd *xhci)
936 */ 936 */
937int xhci_resume(struct xhci_hcd *xhci, bool hibernated) 937int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
938{ 938{
939 u32 command, temp = 0; 939 u32 command, temp = 0, status;
940 struct usb_hcd *hcd = xhci_to_hcd(xhci); 940 struct usb_hcd *hcd = xhci_to_hcd(xhci);
941 struct usb_hcd *secondary_hcd; 941 struct usb_hcd *secondary_hcd;
942 int retval = 0; 942 int retval = 0;
@@ -1054,8 +1054,12 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
1054 1054
1055 done: 1055 done:
1056 if (retval == 0) { 1056 if (retval == 0) {
1057 usb_hcd_resume_root_hub(hcd); 1057 /* Resume root hubs only when have pending events. */
1058 usb_hcd_resume_root_hub(xhci->shared_hcd); 1058 status = readl(&xhci->op_regs->status);
1059 if (status & STS_EINT) {
1060 usb_hcd_resume_root_hub(hcd);
1061 usb_hcd_resume_root_hub(xhci->shared_hcd);
1062 }
1059 } 1063 }
1060 1064
1061 /* 1065 /*