* [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
@ 2018-03-08 17:06 Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-08 17:06 UTC (permalink / raw)
To: Mathias Nyman; +Cc: linux-usb, Yoshihiro Shimoda
On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote:
> From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
>
> This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat:
> enable clk in resume timing") because this driver also has runtime PM
> and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module
> clocks during resume") will restore the clock on R-Car H3 environment.
>
> If the xhci_plat_suspend() disables the clk, the system cannot enable
> the clk in resume like the following behavior:
>
> < In resume >
> - genpd_resume_noirq() runs and enable the clk (enable_count = 1)
> - cpg_mssr_resume_noirq() restores the clk register.
> -- Since the clk was disabled in suspend, cpg_mssr_resume_noirq()
> will disable the clk and keep the enable_count.
> - Even if xhci_plat_resume() calls clk_prepare_enable(), since
> the enable_count is 1, the clk will be not enabled.
>
> After this patch is applied, the cpg-mssr driver will save the clk
> as enable, so the clk will be enabled in resume.
>
> Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
This really should go to 4.15-stable, right? I'll go add the tag if
needed, but want your confirmation first.
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] 5+ messages in thread
* [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
@ 2018-03-13 6:15 Yoshihiro Shimoda
0 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2018-03-13 6:15 UTC (permalink / raw)
To: Greg KH; +Cc: linux-usb, Mathias Nyman
Hi Greg,
> From: Greg KH, Sent: Saturday, March 10, 2018 2:08 AM
>
> On Fri, Mar 09, 2018 at 01:48:37AM +0000, Yoshihiro Shimoda wrote:
> > Hi Greg,
> >
> > > From: Greg KH, Sent: Friday, March 9, 2018 2:06 AM
> > >
> > > On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote:
> > > > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
< snip >
> > > > Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
> > > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > > > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> > >
> > > This really should go to 4.15-stable, right? I'll go add the tag if
> > > needed, but want your confirmation first.
> >
> > Since 4.15 is not longterm release, I think Renesas will not consume 4.15.
>
> But it fixes a bug in 4.15, so someone might care :)
:)
> > So, I don't think this really should go to 4.15-stable.
> > In such case, should I not add Fixes: tag? If not, I'll be careful in the future.
>
> No, the fixes tag was great. I'll just leave it as-is.
I got it. Thank you for your comment!
Best regards,
Yoshihiro Shimoda
> 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] 5+ messages in thread
* [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
@ 2018-03-09 17:07 Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2018-03-09 17:07 UTC (permalink / raw)
To: Yoshihiro Shimoda; +Cc: linux-usb, Mathias Nyman
On Fri, Mar 09, 2018 at 01:48:37AM +0000, Yoshihiro Shimoda wrote:
> Hi Greg,
>
> > From: Greg KH, Sent: Friday, March 9, 2018 2:06 AM
> >
> > On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote:
> > > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > >
> > > This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat:
> > > enable clk in resume timing") because this driver also has runtime PM
> > > and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module
> > > clocks during resume") will restore the clock on R-Car H3 environment.
> > >
> > > If the xhci_plat_suspend() disables the clk, the system cannot enable
> > > the clk in resume like the following behavior:
> > >
> > > < In resume >
> > > - genpd_resume_noirq() runs and enable the clk (enable_count = 1)
> > > - cpg_mssr_resume_noirq() restores the clk register.
> > > -- Since the clk was disabled in suspend, cpg_mssr_resume_noirq()
> > > will disable the clk and keep the enable_count.
> > > - Even if xhci_plat_resume() calls clk_prepare_enable(), since
> > > the enable_count is 1, the clk will be not enabled.
> > >
> > > After this patch is applied, the cpg-mssr driver will save the clk
> > > as enable, so the clk will be enabled in resume.
> > >
> > > Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
> > > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> >
> > This really should go to 4.15-stable, right? I'll go add the tag if
> > needed, but want your confirmation first.
>
> Since 4.15 is not longterm release, I think Renesas will not consume 4.15.
But it fixes a bug in 4.15, so someone might care :)
> So, I don't think this really should go to 4.15-stable.
> In such case, should I not add Fixes: tag? If not, I'll be careful in the future.
No, the fixes tag was great. I'll just leave it as-is.
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] 5+ messages in thread
* [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
@ 2018-03-09 1:48 Yoshihiro Shimoda
0 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2018-03-09 1:48 UTC (permalink / raw)
To: Greg KH; +Cc: linux-usb, Mathias Nyman
Hi Greg,
> From: Greg KH, Sent: Friday, March 9, 2018 2:06 AM
>
> On Thu, Mar 08, 2018 at 05:17:16PM +0200, Mathias Nyman wrote:
> > From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> >
> > This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat:
> > enable clk in resume timing") because this driver also has runtime PM
> > and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module
> > clocks during resume") will restore the clock on R-Car H3 environment.
> >
> > If the xhci_plat_suspend() disables the clk, the system cannot enable
> > the clk in resume like the following behavior:
> >
> > < In resume >
> > - genpd_resume_noirq() runs and enable the clk (enable_count = 1)
> > - cpg_mssr_resume_noirq() restores the clk register.
> > -- Since the clk was disabled in suspend, cpg_mssr_resume_noirq()
> > will disable the clk and keep the enable_count.
> > - Even if xhci_plat_resume() calls clk_prepare_enable(), since
> > the enable_count is 1, the clk will be not enabled.
> >
> > After this patch is applied, the cpg-mssr driver will save the clk
> > as enable, so the clk will be enabled in resume.
> >
> > Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
> > Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> > Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
>
> This really should go to 4.15-stable, right? I'll go add the tag if
> needed, but want your confirmation first.
Since 4.15 is not longterm release, I think Renesas will not consume 4.15.
So, I don't think this really should go to 4.15-stable.
In such case, should I not add Fixes: tag? If not, I'll be careful in the future.
Best regards,
Yoshihiro Shimoda
> 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] 5+ messages in thread
* [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing"
@ 2018-03-08 15:17 Mathias Nyman
0 siblings, 0 replies; 5+ messages in thread
From: Mathias Nyman @ 2018-03-08 15:17 UTC (permalink / raw)
To: gregkh; +Cc: linux-usb, Yoshihiro Shimoda, Mathias Nyman
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
This patch reverts the commit 835e4241e714 ("usb: host: xhci-plat:
enable clk in resume timing") because this driver also has runtime PM
and the commit 560869100b99 ("clk: renesas: cpg-mssr: Restore module
clocks during resume") will restore the clock on R-Car H3 environment.
If the xhci_plat_suspend() disables the clk, the system cannot enable
the clk in resume like the following behavior:
< In resume >
- genpd_resume_noirq() runs and enable the clk (enable_count = 1)
- cpg_mssr_resume_noirq() restores the clk register.
-- Since the clk was disabled in suspend, cpg_mssr_resume_noirq()
will disable the clk and keep the enable_count.
- Even if xhci_plat_resume() calls clk_prepare_enable(), since
the enable_count is 1, the clk will be not enabled.
After this patch is applied, the cpg-mssr driver will save the clk
as enable, so the clk will be enabled in resume.
Fixes: 835e4241e714 ("usb: host: xhci-plat: enable clk in resume timing")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
---
drivers/usb/host/xhci-plat.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 6f03830..6652e2d 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -360,7 +360,6 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev)
{
struct usb_hcd *hcd = dev_get_drvdata(dev);
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
- int ret;
/*
* xhci_suspend() needs `do_wakeup` to know whether host is allowed
@@ -370,12 +369,7 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev)
* reconsider this when xhci_plat_suspend enlarges its scope, e.g.,
* also applies to runtime suspend.
*/
- ret = xhci_suspend(xhci, device_may_wakeup(dev));
-
- if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk))
- clk_disable_unprepare(xhci->clk);
-
- return ret;
+ return xhci_suspend(xhci, device_may_wakeup(dev));
}
static int __maybe_unused xhci_plat_resume(struct device *dev)
@@ -384,9 +378,6 @@ static int __maybe_unused xhci_plat_resume(struct device *dev)
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
int ret;
- if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk))
- clk_prepare_enable(xhci->clk);
-
ret = xhci_priv_resume_quirk(hcd);
if (ret)
return ret;
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-03-13 6:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 17:06 [3/4] usb: host: xhci-plat: revert "usb: host: xhci-plat: enable clk in resume timing" Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2018-03-13 6:15 Yoshihiro Shimoda
2018-03-09 17:07 Greg Kroah-Hartman
2018-03-09 1:48 Yoshihiro Shimoda
2018-03-08 15:17 Mathias Nyman
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.