From 3c7673c5955ece8a1b686fcad177d30442dccaba Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Mon, 29 Jun 2020 17:12:03 -0600 Subject: TCPMv2: Set SOP' protocol revision correctly When setting the protocol revision for SOP' after receiving an SOP' Discover Identity ACK, use the revision from the received ACK, not the VDO version code from the PD revision we were already using. BUG=b:160187091 TEST=Attach PD 3.0 cable; observe 3.0 SOP' traffic TEST=Attach PE 2.0 cable; observe 2.0 SOP' traffic BRANCH=none Signed-off-by: Abe Levkoy Change-Id: I622ba2a71ae98e6d9c18f3813ac6096781bd1096 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2274641 Reviewed-by: Diana Z Commit-Queue: Diana Z Tested-by: Diana Z --- common/usbc/usb_pe_drp_sm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c index 356a688e6e..533a6c1f8b 100644 --- a/common/usbc/usb_pe_drp_sm.c +++ b/common/usbc/usb_pe_drp_sm.c @@ -4372,7 +4372,7 @@ static void pe_vdm_identity_request_cbl_run(int port) */ if (prl_get_rev(port, TCPC_TX_SOP) != PD_REV20) prl_set_rev(port, sop, - pd_get_vdo_ver(port, TCPC_TX_SOP_PRIME)); + PD_HEADER_REV(rx_emsg[port].header)); } else if (response_result == PD_DISC_FAIL) { /* * PE_INIT_PORT_VDM_IDENTITY_NAKed and PE_SRC_VDM_Identity_NAKed -- cgit v1.2.1