summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci-pci.c
diff options
context:
space:
mode:
authorSarah Sharp <sarah.a.sharp@linux.intel.com>2011-03-07 20:24:07 +0100
committerSarah Sharp <sarah.a.sharp@linux.intel.com>2011-03-14 02:23:47 +0100
commitb320937972d456db2a46fdcbc6bebc4dcdc9daa4 (patch)
treea41cfa6897e7b2d6dfd79e43cfb6c77dbd9bf6a7 /drivers/usb/host/xhci-pci.c
parentxhci: Fix re-init on power loss after resume. (diff)
downloadlinux-b320937972d456db2a46fdcbc6bebc4dcdc9daa4.tar.xz
linux-b320937972d456db2a46fdcbc6bebc4dcdc9daa4.zip
xhci: Fixes for suspend/resume of shared HCDs.
Make sure the HCD_FLAG_HW_ACCESSIBLE flag is mirrored by both roothubs, since it refers to whether the shared hardware is accessible. Make sure each bus is marked as suspended by setting usb_hcd->state to HC_STATE_SUSPENDED when the PCI host controller is resumed. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Diffstat (limited to 'drivers/usb/host/xhci-pci.c')
-rw-r--r--drivers/usb/host/xhci-pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 4a9d55e80f73..ceea9f33491c 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -225,7 +225,8 @@ static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup)
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
int retval = 0;
- if (hcd->state != HC_STATE_SUSPENDED)
+ if (hcd->state != HC_STATE_SUSPENDED ||
+ xhci->shared_hcd->state != HC_STATE_SUSPENDED)
return -EINVAL;
retval = xhci_suspend(xhci);