All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime PM
@ 2021-03-24  5:18 Li Jun
  2021-03-26 13:38 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Li Jun @ 2021-03-24  5:18 UTC (permalink / raw)
  To: gregkh, balbi; +Cc: linux-usb, jun.li

Don't enable dwc3 core to wakeup system by default if runtime suspended,
this will make the power domain of dwc3 core or its parent device can't be
off while system sleep even system wakeup by usb is not required.

Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Li Jun <jun.li@nxp.com>
---
Change for v2:
- Add fix tag and cc to stable kernel.

 drivers/usb/dwc3/core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index 94fdbe502ce9..0bba5c21de56 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1840,8 +1840,6 @@ static int dwc3_runtime_suspend(struct device *dev)
 	if (ret)
 		return ret;
 
-	device_init_wakeup(dev, true);
-
 	return 0;
 }
 
@@ -1850,8 +1848,6 @@ static int dwc3_runtime_resume(struct device *dev)
 	struct dwc3     *dwc = dev_get_drvdata(dev);
 	int		ret;
 
-	device_init_wakeup(dev, false);
-
 	ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME);
 	if (ret)
 		return ret;
-- 
2.25.1


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

* Re: [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime PM
  2021-03-24  5:18 [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime PM Li Jun
@ 2021-03-26 13:38 ` Greg KH
  2021-03-27 16:07   ` Jun Li
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2021-03-26 13:38 UTC (permalink / raw)
  To: Li Jun; +Cc: balbi, linux-usb

On Wed, Mar 24, 2021 at 01:18:25PM +0800, Li Jun wrote:
> Don't enable dwc3 core to wakeup system by default if runtime suspended,
> this will make the power domain of dwc3 core or its parent device can't be
> off while system sleep even system wakeup by usb is not required.
> 
> Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
> Cc: <Stable@vger.kernel.org>
> Signed-off-by: Li Jun <jun.li@nxp.com>
> ---
> Change for v2:
> - Add fix tag and cc to stable kernel.
> 
>  drivers/usb/dwc3/core.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> index 94fdbe502ce9..0bba5c21de56 100644
> --- a/drivers/usb/dwc3/core.c
> +++ b/drivers/usb/dwc3/core.c
> @@ -1840,8 +1840,6 @@ static int dwc3_runtime_suspend(struct device *dev)
>  	if (ret)
>  		return ret;
>  
> -	device_init_wakeup(dev, true);
> -
>  	return 0;
>  }
>  
> @@ -1850,8 +1848,6 @@ static int dwc3_runtime_resume(struct device *dev)
>  	struct dwc3     *dwc = dev_get_drvdata(dev);
>  	int		ret;
>  
> -	device_init_wakeup(dev, false);
> -
>  	ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME);
>  	if (ret)
>  		return ret;
> -- 
> 2.25.1
> 

Can I get some verification by other users of this driver that this
actually fixes something?  I find it odd it's not shown up yet to anyone
else...

thanks,

greg k-h

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

* RE: [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime PM
  2021-03-26 13:38 ` Greg KH
@ 2021-03-27 16:07   ` Jun Li
  0 siblings, 0 replies; 3+ messages in thread
From: Jun Li @ 2021-03-27 16:07 UTC (permalink / raw)
  To: Greg KH; +Cc: balbi, linux-usb



> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Friday, March 26, 2021 9:39 PM
> To: Jun Li <jun.li@nxp.com>
> Cc: balbi@kernel.org; linux-usb@vger.kernel.org
> Subject: Re: [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime
> PM
> 
> On Wed, Mar 24, 2021 at 01:18:25PM +0800, Li Jun wrote:
> > Don't enable dwc3 core to wakeup system by default if runtime
> > suspended, this will make the power domain of dwc3 core or its parent
> > device can't be off while system sleep even system wakeup by usb is not
> required.
> >
> > Fixes: fc8bb91bc83e ("usb: dwc3: implement runtime PM")
> > Cc: <Stable@vger.kernel.org>
> > Signed-off-by: Li Jun <jun.li@nxp.com>
> > ---
> > Change for v2:
> > - Add fix tag and cc to stable kernel.
> >
> >  drivers/usb/dwc3/core.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index
> > 94fdbe502ce9..0bba5c21de56 100644
> > --- a/drivers/usb/dwc3/core.c
> > +++ b/drivers/usb/dwc3/core.c
> > @@ -1840,8 +1840,6 @@ static int dwc3_runtime_suspend(struct device *dev)
> >  	if (ret)
> >  		return ret;
> >
> > -	device_init_wakeup(dev, true);
> > -
> >  	return 0;
> >  }
> >
> > @@ -1850,8 +1848,6 @@ static int dwc3_runtime_resume(struct device *dev)
> >  	struct dwc3     *dwc = dev_get_drvdata(dev);
> >  	int		ret;
> >
> > -	device_init_wakeup(dev, false);
> > -
> >  	ret = dwc3_resume_common(dwc, PMSG_AUTO_RESUME);
> >  	if (ret)
> >  		return ret;
> > --
> > 2.25.1
> >
> 
> Can I get some verification by other users of this driver that this
> actually fixes something?  I find it odd it's not shown up yet to anyone
> else...

This is not a common case for dwc3 users, I guess only a few users
support runtime PM as it's disabled by default, even with runtime PM
supported and enabled in my case, system sleeping with dwc3 core wakeup
enabled does not break any function, it's just leave the power domain
(attached to dwc3 core's parent device) _on_ even I don't need any
usb remote wakeup, so it's trying to "fix" a power waste.

Thanks
Li Jun
> 
> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2021-03-27 16:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  5:18 [PATCH v2] usb: dwc3: core: don't enable wakeup for runtime PM Li Jun
2021-03-26 13:38 ` Greg KH
2021-03-27 16:07   ` Jun Li

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.