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

Xu Yang
2025-09-12T07:57:47Z

On Thu, Sep 11, 2025 at 01:35:59PM +0200, Rafael J. Wysocki wrote:
> On Thu, Sep 11, 2025 at 12:58 PM Xu Yang <xu.yang_2@nxp.com> wrote:
> >
> > Hi Ryan,
> >
> > On Thu, Sep 11, 2025 at 01:32:47AM +0000, Thinh Nguyen wrote:
> > > On Wed, Sep 10, 2025, Ryan Zhou wrote:
> > > > Issue description:During the wake-up sequence, if the system invokes
> > > > dwc3->resume and detects that the parent device of dwc3 is in a
> > > > runtime suspend state, the system will generate an error: runtime PM
> > > > trying to activate child device xxx.dwc3 but parent is not active.
> > > >

[...]

> > @@ -2672,6 +2672,9 @@ int dwc3_pm_suspend(struct dwc3 *dwc)
> > struct device *dev = dwc->dev;
> > int ret;
> >
> > + if (pm_runtime_suspended(dev))
> > + pm_runtime_resume(dev);
>
> You can just call pm_runtime_resume() here without the preliminary check.

True.