Re: [PATCH] usb: dwc3: qcom: Check for L2 only when suspending a host with wakeup
From: Thinh Nguyen
Date: Thu Oct 22 2026 - 19:45:10 EST
On Wed, Oct 21, 2026, Peter Chen wrote:
> On 26-10-21 15:44:52, Konrad Dybcio wrote:
> > On 9/28/26 8:16 PM, Fabricio Akio via B4 Relay wrote:
> > > From: Fabricio Akio <fabricioakio@xxxxxxxxx>
> > >
> > > In peripheral mode the core disconnects and powers the PHY off before
> > > the glue suspends, so the link never enters L2 and every system
> > > suspend logs "HS-PHY not in L2". Check only for a host with wakeup,
> > > the one case that parks the PHY in L2.
> > >
> > > Signed-off-by: Fabricio Akio <fabricioakio@xxxxxxxxx>
> > > ---
> >
> > I think we should be able to retain the link in L2 in device
> > mode too upon suspend, but that needs more plumbing on the
> > clock/gdsc side? (+Cc)
> >
>
> From what I see, dwc3 core just keeps gadget (device mode) disconnecting
> when dwc3 core enters suspend. The reason is probably dwc3 core wakeup signal
> (through .dwc3_gadget_wakeup or dwc3_gadget_func_wakeup) is send by software.
> When the system has suspended, no software has run, so can't trigger wakeup.
Remote wakeup isn't the limitation. The host decides when to put the
link to L2/U3, and the device must still respond to a host resume or
reset while suspended. If the core is powered down and its state is
lost, it can't do that. To support this, we'd need to implement device
hibernation.
>
> For runtime suspend, current dwc3 core doesn't consider link suspend event
> (eg, L2/U3) as low power event, and doesn't put dwc3 core entering runtime
> suspend, so the link is always L2 or U3.
>
Right, dwc3 won't runtime suspend while connected, regardless of the
link state.
Fabricio's patch is fine as is.
Thanks,
Thinh