Re: [PATCH] drvier: usb: dwc3: Fix runtime PM trying to activate child device xxx.dwc3 but parent is not active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 于2025年8月27日周三 02:38写道:
>
> On Tue, Aug 26, 2025 at 8:12 AM Ryan Zhou <ryanzhou54@xxxxxxxxx> 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





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux