Re: [PATCH v6 0/5] Fix USB suspend on TI J7200 (cdns3-ti, cdns3, xhci)

Théo Lebrun
2024-12-16T14:09:03Z

Hello Peter,

On Sat Dec 14, 2024 at 10:06 AM CET, Peter Chen wrote:
> On 24-12-10 18:13:34, Théo Lebrun wrote:
> > Currently, system-wide suspend is broken on J7200 because of a
> > controller reset. The TI wrapper does not get re-initialised at resume
> > and the first register access from cdns core fails.
> >
> > We address that in two ways:
> >
> > - In the cdns3-ti wrapper, if a reset has occured at resume,
> > we reconfigure the hardware.
> >
> > - We add a xhci->lost_power flag. Identical to the XHCI_RESET_ON_RESUME
> > quirk, expect that it can be set at runtime.
> >
> > At resume, to summarise, we do:
> > xhci->lost_power = cdns_power_is_lost(cdns);
>
> Is it possible you go to change xhci quirks runtime?

I always assumed quirks were read-only once probe was finished.
If I was wrong then we can remove xhci->lost_power and edit
xhci->quirks instead.

Thanks,

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering