Commit f9da9240 authored by Jos Wang's avatar Jos Wang Committed by Wentao Guan
Browse files

usb: typec: tcpm: set SRC_SEND_CAPABILITIES timeout to PD_T_SENDER_RESPONSE

stable inclusion
from stable-v6.6.76
commit 76bae35d44f325e17f55d1a099703040ddc1dc47
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBW08Q

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=76bae35d44f325e17f55d1a099703040ddc1dc47



--------------------------------

commit 2eb3da037c2c20fa30bc502bc092479b2a1aaae2 upstream.

As PD2.0 spec ("8.3.3.2.3 PE_SRC_Send_Capabilities state"), after the
Source receives the GoodCRC Message from the Sink in response to the
Source_Capabilities message, it should start the SenderResponseTimer,
after the timer times out, the state machine transitions to the
HARD_RESET state.

Fixes: f0690a25 ("staging: typec: USB Type-C Port Manager (tcpm)")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJos Wang <joswang@lenovo.com>
Reviewed-by: default avatarBadhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20250105135245.7493-1-joswang1221@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 76bae35d44f325e17f55d1a099703040ddc1dc47)
Signed-off-by: default avatarWentao Guan <guanwentao@uniontech.com>
parent 78ac16d4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4065,7 +4065,7 @@ static void run_state_machine(struct tcpm_port *port)
			port->caps_count = 0;
			port->pd_capable = true;
			tcpm_set_state_cond(port, SRC_SEND_CAPABILITIES_TIMEOUT,
					    PD_T_SEND_SOURCE_CAP);
					    PD_T_SENDER_RESPONSE);
		}
		break;
	case SRC_SEND_CAPABILITIES_TIMEOUT: