Skip to contentSkip to conversation

patch "usb: typec: tcpm: Do not finish VDM AMS for retrying Responses" added to usb-linus

PATCH [email protected] 1 participant 1 message Jun 9, 2021

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: typec: tcpm: Do not finish VDM AMS for retrying Responses

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 5ab14ab1f2db24ffae6c5c39a689660486962e6e Mon Sep 17 00:00:00 2001
From: Kyle Tso <[email protected]>
Date: Sun, 6 Jun 2021 16:14:52 +0800
Subject: 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.

---
 drivers/usb/typec/tcpm/tcpm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/usb/typec/tcpm/tcpm.c +3 -0
index a7c336f56849..63470cf7f4cd 100644
@@ -1942,6 +1942,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;
Signature · 1 line
2.32.0