[PATCH 0/2] usb: typec: tcpm: improve handling of DISCOVER_MODES failures
From: Sebastian Reichel
Date: Fri Feb 13 2026 - 14:49:17 EST
UGREEN USB-C Multifunction Adapter Model CM512 (AKA "Revodok 107")
exposes two SVIDs: 0xff01 (DP Alt Mode) and 0x1d5c. The DISCOVER_MODES
step succeeds for 0xff01 and gets a NAK for 0x1d5c. Currently this
results in DP Alt Mode not being registered either, since the modes
are only registered once all of them have been discovered. The NAK
results in the processing being stopped and thus no Alt modes being
registered.
Improve the situation by handling the NAK gracefully and continue
processing the other modes.
The second patch moves the discover modes handling for ACK and NAK cases
into its own function to avoid code duplication and having less code in
total. If this is considered cleaner, I can send a v2 with it squashed
into the first patch. I've not done so in v1, so that you can see both
versions as I'm not sure which one is better. So far the processing
logic is fully contained within tcpm_pd_svdm(), which would no longer
be the case after the new function is added. Also the function itself
is quite ugly with the huge amount of arguments.
Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
Sebastian Reichel (2):
usb: typec: tcpm: improve handling of DISCOVER_MODES failures
usb: typec: tcpm: create helper function for DISCOVER_MODES
drivers/usb/typec/tcpm/tcpm.c | 99 +++++++++++++++++++++++++++----------------
1 file changed, 63 insertions(+), 36 deletions(-)
---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20260213-tcpm-discover-modes-nak-fix-09070bb529c5
Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>