summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2018-02-02 16:55:35 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-02-02 16:55:35 -0800
commit6b83a15ee11921e51663980cdd8bfb714366d5cb (patch)
tree10960911298867d0b9c608144aa5aa9906cb3a4f
parent5107b185769ec2ee1e9ef69f8675521fd870f664 (diff)
parenta7a5307ee04ad349d365ad50f304605a9cd9bd0a (diff)
Merge "xhci: plat: Fix xhci_plat shutdown hung"
-rw-r--r--drivers/usb/host/xhci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 5e133de65990..7e76573c8236 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -763,6 +763,10 @@ void xhci_shutdown(struct usb_hcd *hcd)
usb_disable_xhci_ports(to_pci_dev(hcd->self.controller));
spin_lock_irq(&xhci->lock);
+ if (!HCD_HW_ACCESSIBLE(hcd)) {
+ spin_unlock_irq(&xhci->lock);
+ return;
+ }
xhci_halt(xhci);
/* Workaround for spurious wakeups at shutdown with HSW */
if (xhci->quirks & XHCI_SPURIOUS_WAKEUP)