Skip to contentSkip to conversation

Spurious errors "ucsi_acpi USBC000:00: bogus connector number in CCI: 1" on 7.0-rc7

DISCUSSION Takashi Iwai 3 participants 3 messages Apr 7 USB

lore
Share & tools
lore
#0 lore raw

Hi,

since 7.0-rc7, I'm getting a few errors
ucsi_acpi USBC000:00: bogus connector number in CCI: 1
at boot of Thinkpad T14s Gen 6 AMD with a dock.

Obviously this came from the commit d2d8c17ac01a ("usb: typec: ucsi:
validate connector number in ucsi_notify_common()"), and reverting it made it gone away. I didn't notice anything practically broken either before or after the revert, though -- the USB devices connected on the dock keep working, at least.

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.

thanks,

Takashi

#1 lore raw
Quoted 12 lines · Takashi Iwai

Hi,

since 7.0-rc7, I'm getting a few errors
ucsi_acpi USBC000:00: bogus connector number in CCI: 1
at boot of Thinkpad T14s Gen 6 AMD with a dock.

Obviously this came from the commit d2d8c17ac01a ("usb: typec: ucsi:
validate connector number in ucsi_notify_common()"), and reverting it made it gone away. I didn't notice anything practically broken either before or after the revert, though -- the USB devices connected on the dock keep working, at least.

Quoted 3 lines

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?

thanks,

greg k-h

#2 lore raw
Quoted 8 lines · Greg Kroah-Hartman
Quoted 3 lines · Takashi Iwai

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