Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7a5307e authored by Lei wang's avatar Lei wang Committed by Gerrit - the friendly Code Review server
Browse files

xhci: plat: Fix xhci_plat shutdown hung



xhci-plat Shutdown callback should check HCD_FLAG_HW_ACCESSIBLE
before accessing any register. This should avoid hung with access
controllers which support runtime suspend

Change-Id: I53eedf5b8f77dfdfa31d21b303da7058c5a86ba9
Signed-off-by: default avatarLei wang <leiwan@codeaurora.org>
parent 34594476
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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)