diff options
| author | Gris Ge <cnfourt@gmail.com> | 2026-10-01 07:46:08 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-10-11 15:46:27 +0200 |
| commit | 7c590f0716ed3c9ae9809dbc6d488d76c19fdf52 (patch) | |
| tree | 41f34fc4b53134605dbdc7a9e1500d318c56d84d /drivers/usb | |
| parent | 40224df29729618ecd88c5c0077e71b1e82c7a3a (diff) | |
usb: typec: ucsi: Skip CAM query when partner has no alt modes
Since Thunderbolt alternate mode support was added,
`ucsi_altmode_update_active()` is called on every Connector Partner
Changed event. This made the driver send `UCSI_GET_CURRENT_CAM` to
PPMs even when the partner had no alternate modes registered. Firmware
that does not support the optional alternate mode details answered Not
Supported, which produced a spurious error on every partner change:
```
ucsi_acpi USBC000:00: GET_CURRENT_CAM command failed
```
Fixed by skipping the command when there is nothing to update.
Fixes: da87d45b1951 ("usb: typec: ucsi: Add Thunderbolt alternate mode support")
Assisted-by: Codex:deepseek-v4.1-flash
Cc: stable <stable@kernel.org>
Signed-off-by: Gris Ge <cnfourt@gmail.com>
Reviewed-by: Andrei Kuchynski <akuchynski@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260930234611.468765-2-cnfourt@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/typec/ucsi/ucsi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index a5479e488591..5aab8ab9f013 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1519,7 +1519,8 @@ static void ucsi_handle_connector_change(struct work_struct *work) if (con->partner && (change & UCSI_CONSTAT_PARTNER_CHANGE)) { ucsi_partner_change(con); - ucsi_altmode_update_active(con); + if (con->partner_altmode[0]) + ucsi_altmode_update_active(con); /* Complete pending data role swap */ if (!completion_done(&con->complete)) |
