Re: [PATCH 5/5] usb: typec: ucsi: Clear UCSI_CCI_RESET_COMPLETE before reset

Christian A. Ehrhardt
2025-01-22T21:17:29Z

Hi Fedor,

On Sun, Jan 19, 2025 at 04:23:21PM +0300, Fedor Pchelkin wrote:
> Christian A. Ehrhardt wrote:
> > The (compile tested) diff below should fix it and I can turn this
> > into a proper patch but I lost access to test hardware with UCSI,
> > thus this would need a "Tested-by:" from someone else before it can
> > be included. Maybe Saranya can do this?
> >
> > Best regards Christian
> >
> >
> > commit b44ba223cd840e6dbab6c7f69da6203c7a8ba570
> > Author: Christian A. Ehrhardt <lk@c--e.de>
> > Date: Mon Dec 16 21:52:46 2024 +0100
> >
> > acpi: typec: ucsi: Introduce a ->poll_cci method
>
> WARNING: CPU: 0 PID: 8 at drivers/usb/typec/ucsi/ucsi.c:1377 ucsi_reset_ppm+0x1af/0x1c0 [typec_ucsi]
> is triggered on my laptop on roughly every system boot. When it's not,
> there is a
> ucsi_acpi USBC000:00: error -ETIMEDOUT: PPM init failed
> message observed in the log.
>
> I've tried the above patch "acpi: typec: ucsi: Introduce a ->poll_cci
> method" but the issue is still triggered [1].
>
> Is there any useful info/logs I can provide you for further
> investigation of the warning in question?
>
> As the warning is quite reliably triggered on my system, I may help with
> the testing of other patches.

Hard to say what might be going on. Some obvious questions to
narrow it down, though:
- Is this something new and UCSI worked before or has UCSI been broken
with older kernels as well (maybe with different or no error
messages).
- If you get the warning but not the "PPM init failed" message,
does UCSI actually work? Try to plug something into the USB-C
ports and watch out for additional error messages (possibly after
a timeout). Do new files/devices show up in sysfs?
- Printing the value of CCI at various stages of the init process
might help us to understand what's going on.

Best regards,
Christian