All of lore.kernel.org
 help / color / mirror / Atom feed
* refine xhci-plat-Fix-xhci_plat-shutdown-sequence
@ 2018-04-17  3:32 leiwan
  2018-04-17 10:32 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 7+ messages in thread
From: leiwan @ 2018-04-17  3:32 UTC (permalink / raw)
  To: mathias.nyman, gregkh, ghackmann; +Cc: linux-usb

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

This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a

full patch refer attachment.

From 9b65acb64f1ad87d115fa147c9e947fb3d37471c Mon Sep 17 00:00:00 2001
From: Lei wang <leiwan@codeaurora.org>
Date: Tue, 17 Apr 2018 10:55:35 +0800
Subject: [PATCH] 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

Signed-off-by: Lei wang <leiwan@codeaurora.org>
---
 drivers/usb/host/xhci.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9b27798..bdf914d 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* refine xhci-plat-Fix-xhci_plat-shutdown-sequence
@ 2018-04-17 10:32 ` Greg Kroah-Hartman
  2018-04-17 14:32   ` leiwan
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-17 10:32 UTC (permalink / raw)
  To: leiwan; +Cc: mathias.nyman, ghackmann, linux-usb

On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
> 
> 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
> 
> This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
> 
> full patch refer attachment.
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9b27798..bdf914d 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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);

A blank line after the if statement?

What about all of the other places in this driver that you should also
check for this?  Look at the other host controllers, shouldn't you
mirror what they are doing?

And this needs a Fixes: tag, along with a cc: stable so as to properly
get backported as this is broken in some stable kernels right now.

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: refine xhci-plat-Fix-xhci_plat-shutdown-sequence
  2018-04-17 10:32 ` Greg Kroah-Hartman
@ 2018-04-17 14:32   ` leiwan
  2018-04-17 14:37     ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: leiwan @ 2018-04-17 14:32 UTC (permalink / raw)
  To: Greg KH; +Cc: stable

在 2018-04-17 18:32,Greg KH 写道:
> On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
>> 
>> 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
>> 
>> This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
>> 
>> full patch refer attachment.
>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
>> index 9b27798..bdf914d 100644
>> --- a/drivers/usb/host/xhci.c
>> +++ b/drivers/usb/host/xhci.c
>> @@ -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);
> 
> A blank line after the if statement?
> >> [lei]yes
> What about all of the other places in this driver that you should also
> check for this?  Look at the other host controllers, shouldn't you
> mirror what they are doing?
> >> [lei]I checked other usb host module shutdown and suspend workflow.
   >> All usb host driver need to check hw accessable before
   >> read/write usb register especially in runtime PM case..
> And this needs a Fixes: tag, along with a cc: stable so as to properly
> get backported as this is broken in some stable kernels right now.
> >> [lei] Added by v2 patch
> thanks,
> 
> greg k-h


 From c03697fa259ab38d1002598ec2ccfac37607ca0b Mon Sep 17 00:00:00 2001
 From: Lei wang <leiwan@codeaurora.org>
Date: Tue, 17 Apr 2018 10:55:35 +0800
Subject: [PATCH v2] 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

Fixes: b07c12517f2a ("xhci: plat: Register shutdown for xhci_plat")
Cc: <stable@vger.kernel.org>
Signed-off-by: Lei wang <leiwan@codeaurora.org>
---
  drivers/usb/host/xhci.c | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9b27798..bdf914d 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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)
--
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: refine xhci-plat-Fix-xhci_plat-shutdown-sequence
  2018-04-17 14:32   ` leiwan
@ 2018-04-17 14:37     ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2018-04-17 14:37 UTC (permalink / raw)
  To: leiwan; +Cc: stable

On Tue, Apr 17, 2018 at 10:32:28PM +0800, leiwan@codeaurora.org wrote:
> 在 2018-04-17 18:32,Greg KH 写道:
> > On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
> > > 
> > > 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
> > > 
> > > This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
> > > 
> > > full patch refer attachment.
> > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> > > index 9b27798..bdf914d 100644
> > > --- a/drivers/usb/host/xhci.c
> > > +++ b/drivers/usb/host/xhci.c
> > > @@ -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);
> > 
> > A blank line after the if statement?
> > >> [lei]yes
> > What about all of the other places in this driver that you should also
> > check for this?  Look at the other host controllers, shouldn't you
> > mirror what they are doing?
> > >> [lei]I checked other usb host module shutdown and suspend workflow.
>   >> All usb host driver need to check hw accessable before
>   >> read/write usb register especially in runtime PM case..
> > And this needs a Fixes: tag, along with a cc: stable so as to properly
> > get backported as this is broken in some stable kernels right now.
> > >> [lei] Added by v2 patch
> > thanks,
> > 
> > greg k-h
> 
> 
> From c03697fa259ab38d1002598ec2ccfac37607ca0b Mon Sep 17 00:00:00 2001
> From: Lei wang <leiwan@codeaurora.org>
> Date: Tue, 17 Apr 2018 10:55:35 +0800
> Subject: [PATCH v2] 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
> 
> Fixes: b07c12517f2a ("xhci: plat: Register shutdown for xhci_plat")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Lei wang <leiwan@codeaurora.org>
> ---
>  drivers/usb/host/xhci.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9b27798..bdf914d 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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)
> --
> 1.9.1

I totally do not understand, why did you forward a broken patch that was
not accepted upstream to the stable list?

Please go read Documentation/SubmittingPatches for how to do this
correctly.  Your first email was close, but it was attached, which isn't
ok.  And then I provided code review comments which you seem to have
ignored here...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* refine xhci-plat-Fix-xhci_plat-shutdown-sequence
@ 2018-04-18  7:01 Greg Kroah-Hartman
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-18  7:01 UTC (permalink / raw)
  To: leiwan; +Cc: mathias.nyman, ghackmann, linux-usb

On Wed, Apr 18, 2018 at 01:41:45PM +0800, leiwan@codeaurora.org wrote:
> On 2018-04-17 18:32, Greg KH wrote:
> > On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
> > > 
> > > 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
> > > 
> > > This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
> > > 
> > > full patch refer attachment.
> > > diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> > > index 9b27798..bdf914d 100644
> > > --- a/drivers/usb/host/xhci.c
> > > +++ b/drivers/usb/host/xhci.c
> > > @@ -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);
> > 
> > A blank line after the if statement?
> > > [lei]I checked other code in this file, seems we do not neeed a
> > > blank line after if here.
> > 
> > What about all of the other places in this driver that you should also
> > check for this?  Look at the other host controllers, shouldn't you
> > mirror what they are doing?
> > > [lei] The issue here is when shutdown called, xhci-host driver will
> > > try to access
> > > usb register which may be in runtime suspend state, this lead to a
> > > hang up.
> > > Similar as what xhci-host suspend workflow has done, we need check
> > > HW_ACCESS.
> > And this needs a Fixes: tag, along with a cc: stable so as to properly
> > get backported as this is broken in some stable kernels right now.
> > > [lei] Added Cc and Fixes part in commit message
> > 
> > thanks,
> > 
> > greg k-h
> 
> 
> From c03697fa259ab38d1002598ec2ccfac37607ca0b Mon Sep 17 00:00:00 2001
> From: Lei wang <leiwan@codeaurora.org>
> Date: Tue, 17 Apr 2018 10:55:35 +0800
> Subject: [PATCH v2] 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
> 
> Fixes: b07c12517f2a ("xhci: plat: Register shutdown for xhci_plat")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Lei wang <leiwan@codeaurora.org>
> ---
>  drivers/usb/host/xhci.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9b27798..bdf914d 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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)
> --
> 1.9.1

Please step back, go find someone at Qualcomm that knows how to submit
patches upstream, and have them read this email and point out what you
did incorrectly.

Also, you did not address any of the patch review comments I made on the
first version for some unknown reason, making it less likely that anyone
wants to review this patch again as it's obviously not correct...

thanks,

greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* refine xhci-plat-Fix-xhci_plat-shutdown-sequence
@ 2018-04-18  5:41 leiwan
  0 siblings, 0 replies; 7+ messages in thread
From: leiwan @ 2018-04-18  5:41 UTC (permalink / raw)
  To: Greg KH; +Cc: mathias.nyman, ghackmann, linux-usb

On 2018-04-17 18:32, Greg KH wrote:
> On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
>> 
>> 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
>> 
>> This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
>> 
>> full patch refer attachment.
>> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
>> index 9b27798..bdf914d 100644
>> --- a/drivers/usb/host/xhci.c
>> +++ b/drivers/usb/host/xhci.c
>> @@ -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);
> 
> A blank line after the if statement?
>> [lei]I checked other code in this file, seems we do not neeed a blank 
>> line after if here.
> 
> What about all of the other places in this driver that you should also
> check for this?  Look at the other host controllers, shouldn't you
> mirror what they are doing?
>> [lei] The issue here is when shutdown called, xhci-host driver will 
>> try to access
>> usb register which may be in runtime suspend state, this lead to a 
>> hang up.
>> Similar as what xhci-host suspend workflow has done, we need check 
>> HW_ACCESS.
> And this needs a Fixes: tag, along with a cc: stable so as to properly
> get backported as this is broken in some stable kernels right now.
>> [lei] Added Cc and Fixes part in commit message
> 
> thanks,
> 
> greg k-h


 From c03697fa259ab38d1002598ec2ccfac37607ca0b Mon Sep 17 00:00:00 2001
 From: Lei wang <leiwan@codeaurora.org>
Date: Tue, 17 Apr 2018 10:55:35 +0800
Subject: [PATCH v2] 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

Fixes: b07c12517f2a ("xhci: plat: Register shutdown for xhci_plat")
Cc: <stable@vger.kernel.org>
Signed-off-by: Lei wang <leiwan@codeaurora.org>
---
  drivers/usb/host/xhci.c | 4 ++++
  1 file changed, 4 insertions(+)

--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 9b27798..bdf914d 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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)

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* refine xhci-plat-Fix-xhci_plat-shutdown-sequence
@ 2018-04-17  9:58 Greg Kroah-Hartman
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2018-04-17  9:58 UTC (permalink / raw)
  To: leiwan; +Cc: mathias.nyman, ghackmann, linux-usb

On Tue, Apr 17, 2018 at 11:32:42AM +0800, leiwan@codeaurora.org wrote:
> 
> 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
> 
> This 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=a7a5307ee04ad349d365ad50f304605a9cd9bd0a
> 
> full patch refer attachment.
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9b27798..bdf914d 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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 9b65acb64f1ad87d115fa147c9e947fb3d37471c Mon Sep 17 00:00:00 2001
> From: Lei wang <leiwan@codeaurora.org>
> Date: Tue, 17 Apr 2018 10:55:35 +0800
> Subject: [PATCH] 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
> 
> Signed-off-by: Lei wang <leiwan@codeaurora.org>
> ---
>  drivers/usb/host/xhci.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index 9b27798..bdf914d 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
> @@ -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)
> -- 
> 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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-18  7:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17  3:32 refine xhci-plat-Fix-xhci_plat-shutdown-sequence leiwan
2018-04-17 10:32 ` Greg Kroah-Hartman
2018-04-17 14:32   ` leiwan
2018-04-17 14:37     ` Greg KH
2018-04-17  9:58 Greg Kroah-Hartman
2018-04-18  5:41 leiwan
2018-04-18  7:01 Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.