* [PATCH] usb: typec: ucsi: log invalid UCSI version of 0
@ 2026-11-19 3:56 Blake Alexander via B4 Relay
2026-11-19 4:02 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Blake Alexander via B4 Relay @ 2026-11-19 3:56 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Blake Alexander
From: Blake Alexander <contact@blakejalexander.com>
Some devices ship bugged firmware which sets the version of the UCSI
mailbox to zero. In such cases the ucsi_register() will return -ENODEV
and the driver will silently fail to bind. There is otherwise no
indication as to the cause of the probe failure.
While existing (and future) machine-specific workarounds may resolve
this issue by assuming a known-good UCSI version, future devices or
older firmware revisions with this issue will still silently fail.
Both users and developers will benefit from a clear diagnostic message
when troubleshooting this particular bug.
Add a dev_err() log message when a UCSI version of 0 is reported during
ucsi_register() hinting towards a potential firmware bug.
Signed-off-by: Blake Alexander <contact@blakejalexander.com>
---
Hi,
I have a ThinkPad T14 Gen 2a which is failing to negotiate a DisplayPort
Alt-Mode connection to a monitor-hub with a USB-C cable.
I spent quite some time troubleshooting the issue and identified the
root-cause only to find that a patch which fixes this issue was already
submitted:
- "[PATCH v2 0/2] usb: typec: acpi: Zero version quirk for Lenovo ThinkPad T14 Gen 2a" <20261103-ucsi-lenovo-t14g2a-v2-0-e85c659b56a2@resetko.pl>
Similar issues with other laptops have also been recently submitted:
- "[PATCH] usb: typec: ucsi: acpi: Add quirk for ASUS ROG Zephyrus Duo 16 GX650PI" <20261009-usb-next-v1-1-95a2288ad9b2@gmail.com>
And existing quirks are also already handled in mainline:
- Acer Nitro ANV15-41: commit 8c51ea651d04 ("usb: typec: ucsi: acpi:
Assume UCSI 1.2 on Acer Nitro ANV15-41")
In the hope of saving future developer's time, this patch adds a
dev_err() log message when the UCSI version register reads zero. The
log message hints towards a potential firmware bug and gives an
explicit cause of the driver's probe failure.
Tested on ThinkPad BIOS R1MET65W (1.35), EC R1MHT65W without the
relevant quirk patches.
---
drivers/usb/typec/ucsi/ucsi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 9e453d216c16..fa79ba6dec02 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -2396,8 +2396,13 @@ int ucsi_register(struct ucsi *ucsi)
if (ret)
return ret;
- if (!ucsi->version)
+ /* Version of 0 is not valid but some vendors may report it due to bugged
+ * FW and there may not already be a workaround quirk to correct it.
+ */
+ if (!ucsi->version) {
+ dev_err(ucsi->dev, "UCSI interface reported version 0.0.0: possible firmware bug.");
return -ENODEV;
+ }
/*
* Version format is JJ.M.N (JJ = Major version, M = Minor version,
---
base-commit: f11fe7603df07fbb9fa02b0d385c1696c87a6dab
change-id: 20261119-log-ucsi-firmware-quirk-8ffc87c7d42f
Best regards,
--
Blake Alexander <contact@blakejalexander.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: typec: ucsi: log invalid UCSI version of 0
2026-11-19 3:56 [PATCH] usb: typec: ucsi: log invalid UCSI version of 0 Blake Alexander via B4 Relay
@ 2026-11-19 4:02 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-19 4:02 UTC (permalink / raw)
To: Blake Alexander; +Cc: linux-usb
> From: Blake Alexander <contact@blakejalexander.com>
>
> Some devices ship bugged firmware which sets the version of the UCSI
> mailbox to zero. In such cases the ucsi_register() will return -ENODEV
> and the driver will silently fail to bind. There is otherwise no
> indication as to the cause of the probe failure.
>
> While existing (and future) machine-specific workarounds may resolve
> this issue by assuming a known-good UCSI version, future devices or
> older firmware revisions with this issue will still silently fail.
> Both users and developers will benefit from a clear diagnostic message
> when troubleshooting this particular bug.
>
> Add a dev_err() log message when a UCSI version of 0 is reported during
> ucsi_register() hinting towards a potential firmware bug.
>
> Signed-off-by: Blake Alexander <contact@blakejalexander.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-log-ucsi-firmware-quirk-v1-1-6d42d70a6158@blakejalexander.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-19 4:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 3:56 [PATCH] usb: typec: ucsi: log invalid UCSI version of 0 Blake Alexander via B4 Relay
2026-11-19 4:02 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox