[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20260109004520.5l7tkyhgi6cooeda@synopsys.com>
Date: Fri, 9 Jan 2026 00:45:29 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Xu Yang <xu.yang_2@....com>
CC: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>,
"jun.li@....com" <jun.li@....com>
Subject: Re: [PATCH v2 3/3] usb: dwc3: imx8mp: disable auto suspend for host
role
On Thu, Jan 08, 2026, Xu Yang wrote:
> On Tue, Dec 16, 2025 at 11:26:40PM +0000, Thinh Nguyen wrote:
> > On Fri, Dec 05, 2025, Xu Yang wrote:
> > > Do dwc3 core auto suspend enable for device and disable for host
> > > , this can make sure dwc3 core device auto suspend setting is
> > > correct all the time, the background of disable dwc3 core device
> > > auto suspend is to make its parent device suspend immediately
> > > (so wakeup enable can be enabled) after xhci-plat device suspended,
> > > for device mode, we keep the dwc3 core device auto suspend is to
> > > give some wait for gadget to be enumerated.
> > >
> > > Note: It's a temporary solution until we switch to using the new
> > > flatten model.
> > >
> > > Signed-off-by: Xu Yang <xu.yang_2@....com>
> > >
> > > ---
> > > Changes in v2:
> > > - add a note suggested by Thinh
> > > ---
> > > drivers/usb/dwc3/dwc3-imx8mp.c | 31 +++++++++++++++++++++++++++++++
> > > 1 file changed, 31 insertions(+)
> > >
> > > diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
> > > index 8bece4baecbf..2e13ca588f42 100644
> > > --- a/drivers/usb/dwc3/dwc3-imx8mp.c
> > > +++ b/drivers/usb/dwc3/dwc3-imx8mp.c
> > > @@ -158,11 +158,31 @@ static irqreturn_t dwc3_imx8mp_interrupt(int irq, void *_dwc3_imx)
> > > return IRQ_HANDLED;
> > > }
> > >
> > > +static void dwc3_imx_pre_set_role(struct dwc3 *dwc, enum usb_role role)
> > > +{
> > > + if (role == USB_ROLE_HOST)
> > > + /*
> > > + * For xhci host, we need disable dwc core auto
> > > + * suspend, because during this auto suspend delay(5s),
> > > + * xhci host RUN_STOP is cleared and wakeup is not
> > > + * enabled, if device is inserted, xhci host can't
> > > + * response the connection.
> > > + */
> > > + pm_runtime_dont_use_autosuspend(dwc->dev);
> >
> > As noted previously, don't we need to unwind this in dwc3_imx8mp_remove
> > if the current mode device?
>
> Thanks for the reminder. I check it, dwc3_core_remove() will call
> pm_runtime_dont_use_autosuspend(). So it seems unnecessary to unwind it
> again in dwc3_imx8mp_remove().
>
Thanks for checking.
BR,
Thinh
Powered by blists - more mailing lists