summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-07 18:02:37 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-07 18:02:37 -0700
commitf8dd7a2a3a572dd93d7e84d628ffb25b3309179b (patch)
tree9a8a379d256af73f9667b04500d47d313a30fdc6 /drivers/usb/host/xhci.c
parentd6759133e9815ef807b17dc752aff8c3771b7444 (diff)
parentcd3de83f147601356395b57a8673e9c5ff1e59d1 (diff)
downloadop-kernel-dev-f8dd7a2a3a572dd93d7e84d628ffb25b3309179b.zip
op-kernel-dev-f8dd7a2a3a572dd93d7e84d628ffb25b3309179b.tar.gz
Merge 3.16-rc4 into usb-next
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 013aabb..f07be65 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -936,7 +936,7 @@ int xhci_suspend(struct xhci_hcd *xhci)
*/
int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
{
- u32 command, temp = 0;
+ u32 command, temp = 0, status;
struct usb_hcd *hcd = xhci_to_hcd(xhci);
struct usb_hcd *secondary_hcd;
int retval = 0;
@@ -1054,8 +1054,12 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
done:
if (retval == 0) {
- usb_hcd_resume_root_hub(hcd);
- usb_hcd_resume_root_hub(xhci->shared_hcd);
+ /* Resume root hubs only when have pending events. */
+ status = readl(&xhci->op_regs->status);
+ if (status & STS_EINT) {
+ usb_hcd_resume_root_hub(hcd);
+ usb_hcd_resume_root_hub(xhci->shared_hcd);
+ }
}
/*
OpenPOWER on IntegriCloud