Patch "usb: typec: tcpm: Do not finish VDM AMS for retrying Responses" has been added to the 5.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 the 5.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-typec-tcpm-do-not-finish-vdm-ams-for-retrying-responses.patch
and it can be found in the queue-5.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 5ab14ab1f2db24ffae6c5c39a689660486962e6e Mon Sep 17 00:00:00 2001
From: Kyle Tso <kyletso@xxxxxxxxxx>
Date: Sun, 6 Jun 2021 16:14:52 +0800
Subject: usb: typec: tcpm: Do not finish VDM AMS for retrying Responses

From: Kyle Tso <kyletso@xxxxxxxxxx>

commit 5ab14ab1f2db24ffae6c5c39a689660486962e6e upstream.

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@xxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx>
Acked-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Signed-off-by: Kyle Tso <kyletso@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20210606081452.764032-1-kyletso@xxxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/usb/typec/tcpm/tcpm.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -1917,6 +1917,9 @@ static void vdm_run_state_machine(struct
 			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;


Patches currently in stable-queue which might be from kyletso@xxxxxxxxxx are

queue-5.12/usb-pd-set-pd_t_sink_wait_cap-to-310ms.patch
queue-5.12/usb-typec-tcpm-properly-handle-alert-and-status-messages.patch
queue-5.12/usb-typec-tcpm-do-not-finish-vdm-ams-for-retrying-responses.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux