Skip to content

Commit 5ab14ab

Browse files
kyletsoadlgregkh
authored andcommitted
usb: typec: tcpm: Do not finish VDM AMS for retrying Responses
If the VDM responses couldn't be sent successfully, it doesn't need to finish the AMS until the retry count reaches the limit. Fixes: 0908c5a ("usb: typec: tcpm: AMS and Collision Avoidance") Reviewed-by: Guenter Roeck <[email protected]> Cc: stable <[email protected]> Acked-by: Heikki Krogerus <[email protected]> Signed-off-by: Kyle Tso <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 032e288 commit 5ab14ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/typec/tcpm/tcpm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,6 +1942,9 @@ static void vdm_run_state_machine(struct tcpm_port *port)
19421942
tcpm_log(port, "VDM Tx error, retry");
19431943
port->vdm_retries++;
19441944
port->vdm_state = VDM_STATE_READY;
1945+
if (PD_VDO_SVDM(vdo_hdr) && PD_VDO_CMDT(vdo_hdr) == CMDT_INIT)
1946+
tcpm_ams_finish(port);
1947+
} else {
19451948
tcpm_ams_finish(port);
19461949
}
19471950
break;

0 commit comments

Comments
 (0)