refine xhci-plat-Fix-xhci_plat-shutdown-sequence
Greg Kroah-Hartman
maintainerQuoted 58 lines · On Tue, Apr 17, 2018 at 11:32:42AM +0800, [email protected] wrote:
xhci-plat Shutdown callback should check
HCD_FLAG_HW_ACCESSIBLEbefore accessing any register. This should avoid hung with access controllers which support runtime suspendThis can fix for issue of https://patchwork.kernel.org/patch/10339317/
corresponding upload in CAF:
https://source.codeaurora.org/quic/la/kernel/msm-4.4/commit/?h=LV.HB.1.1.5-03810-8x96.0&id=a7a5307ee04ad349d365ad50f304605a9cd9bd0afull patch refer attachment.
drivers/usb/host/xhci.c +4
-0@@ -702,6 +702,10 @@ static void xhci_shutdown(struct usb_hcd *hcd)usb_disable_xhci_ports (to_pci_dev (hcd->self.sysdev));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 )From
9b65acb64f1ad87d115fa147c9e947fb3d37471cMon Sep 17 00:00:00 2001
From: Lei wang <[email protected]>
Date: Tue, 17 Apr 2018 10:55:35 +0800
Subject: [PATCH] xhci: plat: Fixxhci_platshutdown hungxhci-plat Shutdown callback should check
HCD_FLAG_HW_ACCESSIBLEbefore accessing any register. This should avoid hung with access controllers which support runtime suspendSigned-off-by Lei wang <[email protected]>--- drivers/usb/host/xhci.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/usb/host/xhci.c +4
-0@@ -702,6 +702,10 @@ static void xhci_shutdown(struct usb_hcd *hcd)usb_disable_xhci_ports (to_pci_dev (hcd->self.sysdev));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 )Signature · 1 line
1.9.1
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch was attached, please place it inline so that it can be applied directly from the email message itself.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html