Skip to content

Commit 2d3b067

Browse files
RD Babierasmb49
authored andcommitted
usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
BugLink: https://bugs.launchpad.net/bugs/2115252 commit e918d39 upstream. This patch fixes Type-C Compliance Test TD 4.7.6 - Try.SNK DRP Connect SNKAS. The compliance tester moves into SNK_UNATTACHED during toggling and expects the PUT to apply Rp after tPDDebounce of detection. If the port is in SNK_TRY_WAIT_DEBOUNCE, it will move into SRC_TRYWAIT immediately and apply Rp. This violates TD 4.7.5.V.3, where the tester confirms that the PUT attaches Rp after the transitions to Unattached.SNK for tPDDebounce. Change the tcpm_set_state delay between SNK_TRY_WAIT_DEBOUNCE and SRC_TRYWAIT to tPDDebounce. Fixes: a0a3e04 ("staging: typec: tcpm: Check for Rp for tPDDebounce") Cc: stable <[email protected]> Signed-off-by: RD Babiera <[email protected]> Reviewed-by: Badhri Jagan Sridharan <[email protected]> Reviewed-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Manuel Diewald <[email protected]> Signed-off-by: Stefan Bader <[email protected]>
1 parent 1845bac commit 2d3b067

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5965,7 +5965,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
59655965
case SNK_TRY_WAIT_DEBOUNCE:
59665966
if (!tcpm_port_is_sink(port)) {
59675967
port->max_wait = 0;
5968-
tcpm_set_state(port, SRC_TRYWAIT, 0);
5968+
tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE);
59695969
}
59705970
break;
59715971
case SRC_TRY_WAIT:

0 commit comments

Comments
 (0)