ACK: [SRU][Q][PATCH 0/2] Got call trace when plug in device/AC in type-c port(both TBT5/TBT4)
Benjamin Wheeler
benjamin.wheeler at canonical.com
Thu Jan 15 20:27:12 UTC 2026
Acked-by: Benjamin Wheeler <benjamin.wheeler at canonical.com>
On Sun, Jan 11, 2026 at 8:08 PM AceLan Kao <acelan.kao at canonical.com> wrote:
>
> From: "Chia-Lin Kao (AceLan)" <acelan.kao at canonical.com>
>
> BugLink: https://bugs.launchpad.net/bugs/2138192l
>
> [Impact]
> On systems with UCSI (USB Type-C Connector System Software Interface) version earlier than 2.1, the kernel generates warnings when handling USB Type-C connector changes. The kernel attempts to read power-related status bits that don't exist in older UCSI versions.
>
> Error log:
> [ 8.767836] Access to unsupported field at offset 0x59 (need version 0210)
> [ 8.767891] WARNING: CPU: 10 PID: 133 at drivers/usb/typec/ucsi/ucsi.c:1419 ucsi_handle_connector_change+0x402/0x490 [typec_ucsi]
>
> The code unconditionally checks the PWR_READING_READY_V2_1 bit in connector status without verifying the UCSI version, leading to accessing undefined bits on systems with UCSI versions older than 2.1. This triggers a kernel warning every time a USB Type-C device is connected or disconnected.
>
> Affected hardware: Dell systems with USB Type-C ports using UCSI version < 2.1
> Failure rate: 100% on affected hardware when USB Type-C devices are connected/disconnected
>
> [Fix]
> Add UCSI version check before reading power-related status bits. The "Power Reading" bit and associated fields were introduced in UCSI specification v2.1, so the code now limits the check for these bits only if the supported version is 2.1 or above.
>
> Both patches are upstream in mainline kernel v6.18 and reviewed by Intel maintainers.
>
> Commit c851b71fd6cd ("usb: typec: ucsi: Add support for READ_POWER_LEVEL command")
> - Adds support for UCSI v2.1 READ_POWER_LEVEL command to debugfs
> - Exposes peak_current, avg_current, and vbus_voltage in debugfs
> - Updates power values when READ_POWER_LEVEL command is sent or when device is connected
>
> Commit 1bc28f015a19 ("usb: typec: ucsi: Add check for UCSI version")
> - Fixes the above commit by adding version check
> - Prevents accessing v2.1-specific bits on older UCSI versions
>
> Links:
> https://lore.kernel.org/r/20250814163028.18058-1-venkat.jayaraman@intel.com
> https://lore.kernel.org/r/20250905184401.3222530-1-venkat.jayaraman@intel.com
>
> [Test Plan]
> On a system with UCSI version < 2.1:
>
> 1. Connect a USB Type-C device (e.g., USB-C to USB-A adapter, USB-C charger, or USB-C dock)
> 2. Check dmesg for kernel warnings related to UCSI:
> $ dmesg | grep -E "Access to unsupported field|ucsi_handle_connector_change"
>
> Without the patch: Kernel warning appears showing "Access to unsupported field at offset 0x59 (need version 0210)"
> With the patch: No warnings, UCSI operates correctly on both v2.1 and earlier versions
>
> [Where problems could occur]
> The changes affect the USB Type-C UCSI driver, specifically the power reading functionality.
>
> If the version check logic is incorrect, systems with UCSI v2.1 might not read power levels even though they support the feature. This would manifest as empty or stale values in the debugfs power reading files (peak_current, avg_current, vbus_voltage) even when USB Type-C devices are connected.
>
> Conversely, if the version comparison is too strict, some systems with v2.1 support might be incorrectly identified as older versions and miss out on power reading capabilities.
>
> The debugfs file creation could fail if there are issues with the file operations structures, preventing users from accessing power readings through debugfs, though this would only affect debugging functionality and not normal USB Type-C operation.
>
> Venkat Jayaraman (2):
> usb: typec: ucsi: Add support for READ_POWER_LEVEL command
> usb: typec: ucsi: Add check for UCSI version
>
> drivers/usb/typec/ucsi/debugfs.c | 31 +++++++++++++++++++++++++++++++
> drivers/usb/typec/ucsi/ucsi.c | 17 +++++++++++++++++
> drivers/usb/typec/ucsi/ucsi.h | 13 +++++++++++++
> 3 files changed, 61 insertions(+)
>
> --
> 2.51.0
>
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
More information about the kernel-team
mailing list