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: 0908c5aca31e ("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>

authored by Kyle Tso and committed by Greg Kroah-Hartman 5ab14ab1 032e2880

+3
+3
drivers/usb/typec/tcpm/tcpm.c
··· 1942 1942 tcpm_log(port, "VDM Tx error, retry"); 1943 1943 port->vdm_retries++; 1944 1944 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 { 1945 1948 tcpm_ams_finish(port); 1946 1949 } 1947 1950 break;