Re: Spurious errors "ucsi_acpi USBC000:00: bogus connector number in CCI: 1" on 7.0-rc7
From: Nathan Rebello
Date: Tue Apr 07 2026 - 02:22:39 EST
On Tue, Apr 07, 2026 at 07:58:00AM +0200, Greg Kroah-Hartman wrote:
> On Tue, Apr 07, 2026 at 07:38:50AM +0200, Takashi Iwai wrote:
> > Is this a firmware bug, or some missing piece in the code?
> > Judging from the message, it means that ucsi->cap.num_connectors is 0,
> > I suppose.
>
> Ugh, what's the odds this is an off-by-one error in the firmware? :)
>
> Nathan and Heikki, any ideas?
This isn't an off-by-one or firmware bug. Takashi is right that
num_connectors is 0. The validation checks against
ucsi->cap.num_connectors, but notifications can arrive before
ucsi_init() has populated that field via GET_CAPABILITY.
Pre-init notifications are already handled safely by the early-event
guard in ucsi_connector_change(), so the fix is to skip validation
when num_connectors hasn't been initialized yet.
Sending a fix shortly.
Thanks,
Nathan