From: ryan zhou <ryanzhou54@gmail.com>
To: Roy Luo <royluo@google.com>
Cc: Thinh.Nguyen@synopsys.com, gregkh@linuxfoundation.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drvier: usb: dwc3: Fix runtime PM trying to activate child device xxx.dwc3 but parent is not active
Date: Wed, 27 Aug 2025 22:09:10 +0800 [thread overview]
Message-ID: <CAPwe5RMpdG1ziRAwDhqkxuzHX0x=SdFQRFUbPCVuir1OgE90YQ@mail.gmail.com> (raw)
In-Reply-To: <CA+zupgwnbt=5Oh28Chco=YNt9WwKzi2J+0hQ04nqyZG_7WUAYg@mail.gmail.com>
Hi Roy,
Thank you for reviewing my patch.
>
> Wouldn't the parent glue dev already resume before resuming the child dwc3?
>
No, in the following case, the parent device will not be reviewed
before resuming the child device.
Taking the 'imx8mp-dwc3' driver as an example.
Step 1.usb disconnect trigger: the child device dwc3 enter runtime
suspend state firstly, followed by
the parent device imx8mp-dwc3 enters runtime suspend
flow:dwc3_runtime_suspend->dwc3_imx8mp_runtime_suspend
Step2.system deep trigger:consistent with the runtime suspend flow,
child enters pm suspend and followed
by parent
flow: dwc3_pm_suspend->dwc3_imx8mp_pm_suspend
Step3: After dwc3_pm_suspend, and before dwc3_imx8mp_pm_suspend, a
task terminated the system suspend process
. The system will resume from the checkpoint, and resume devices in
the suspended state in the reverse
of pm suspend, but excluding the parent device imx8mp-dwc3 since it
did not execute the suspend process.
>
>Why would 'runtime PM trying to activate child device xxx.dwc3 but parent is not active' happen in the first place?
>
Following the above analysis, dwc3_resume calls
pm_runtime_set_active(dev), it checks the
parent.power->runtime_status is not RPM_ACTIVE and outputs the error log.
>
>What is the glue driver that's being used here? Knowing what's being done in the glue driver pm callbacks
>would help in understanding the issue.
>
Refer to the driver 'dwc3-imx8mp.c' please, maybe you could help me
find a better solution.
Thanks,
ryan
Roy Luo <royluo@google.com> 于2025年8月27日周三 02:38写道:
>
> On Tue, Aug 26, 2025 at 8:12 AM Ryan Zhou <ryanzhou54@gmail.com> wrote:
> >
> > Issue description:
> > The parent device dwc3_glue has runtime PM enabled and is in the
> > runtime suspended state. The system enters the deep sleep process
> > but is interrupted by another task. When resuming dwc3,
> > console outputs the log 'runtime PM trying to activate child device
> > xxx.dwc3 but parent is not active'.
> >
>
> Wouldn't the parent glue dev already resume before resuming the child dwc3?
> Why would 'runtime PM trying to activate child device xxx.dwc3 but parent is
> not active' happen in the first place?
> What is the glue driver that's being used here? Knowing what's being done in
> the glue driver pm callbacks would help in understanding the issue.
>
> Regards,
> Roy
next prev parent reply other threads:[~2025-08-27 14:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 15:08 [PATCH] drvier: usb: dwc3: Fix runtime PM trying to activate child device xxx.dwc3 but parent is not active Ryan Zhou
2025-08-26 18:38 ` Roy Luo
2025-08-27 14:09 ` ryan zhou [this message]
2025-08-27 14:52 ` Alan Stern
2025-08-27 18:56 ` Rafael J. Wysocki
2025-08-29 0:43 ` Thinh Nguyen
2025-08-29 1:25 ` Alan Stern
2025-08-29 19:07 ` Thinh Nguyen
2025-08-29 19:26 ` Rafael J. Wysocki
2025-08-29 20:13 ` Thinh Nguyen
2025-08-30 0:46 ` Alan Stern
2025-08-30 1:14 ` Thinh Nguyen
2025-08-29 19:23 ` Rafael J. Wysocki
2025-08-29 19:58 ` Alan Stern
2025-09-01 19:41 ` Rafael J. Wysocki
2025-09-01 20:40 ` Rafael J. Wysocki
2025-09-02 2:41 ` Alan Stern
2025-09-03 11:51 ` ryan zhou
2025-09-03 19:30 ` Rafael J. Wysocki
2025-09-03 21:54 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPwe5RMpdG1ziRAwDhqkxuzHX0x=SdFQRFUbPCVuir1OgE90YQ@mail.gmail.com' \
--to=ryanzhou54@gmail.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=royluo@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).