FROMGIT: 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:0908c5aca3("usb: typec: tcpm: AMS and Collision Avoidance") Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: stable <stable@vger.kernel.org> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Kyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210606081452.764032-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit5ab14ab1f2https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus) Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Ida18c423bcc587bb217a61522ff5a4212f92ce2c
This commit is contained in:
parent
72133c19f5
commit
87378c6fbc
1 changed files with 3 additions and 0 deletions
|
|
@ -1992,6 +1992,9 @@ static void vdm_run_state_machine(struct tcpm_port *port)
|
|||
tcpm_log(port, "VDM Tx error, retry");
|
||||
port->vdm_retries++;
|
||||
port->vdm_state = VDM_STATE_READY;
|
||||
if (PD_VDO_SVDM(vdo_hdr) && PD_VDO_CMDT(vdo_hdr) == CMDT_INIT)
|
||||
tcpm_ams_finish(port);
|
||||
} else {
|
||||
tcpm_ams_finish(port);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue