]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: ucsi: Handle incorrect num_connectors capability
authorMark Pearson <mpearson-lenovo@squebb.ca>
Thu, 21 Aug 2025 18:53:07 +0000 (14:53 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jan 2026 12:09:48 +0000 (13:09 +0100)
commit58941bbb0050e365a98c64f1fc4a9a0ac127dba6
treec01da1c5630713b62d5827bc1b0a2a1d6d601ace
parentf3f0303b533093af04c7bc050c671fe9c2718956
usb: typec: ucsi: Handle incorrect num_connectors capability

[ Upstream commit 30cd2cb1abf4c4acdb1ddb468c946f68939819fb ]

The UCSI spec states that the num_connectors field is 7 bits, and the
8th bit is reserved and should be set to zero.
Some buggy FW has been known to set this bit, and it can lead to a
system not booting.
Flag that the FW is not behaving correctly, and auto-fix the value
so that the system boots correctly.

Found on Lenovo P1 G8 during Linux enablement program. The FW will
be fixed, but seemed worth addressing in case it hit platforms that
aren't officially Linux supported.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250821185319.2585023-1-mpearson-lenovo@squebb.ca
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/ucsi/ucsi.c