From 534b6b0884363660e9762368582fc45ae6256fbe Mon Sep 17 00:00:00 2001 From: Ayushee Date: Mon, 27 Apr 2020 12:16:52 -0700 Subject: usb_pd: Correct processing discover SVID In current code, Discover SVID SOP' is sent if the cable supports Intel SVID. But, according to USB Type-C Cable and Connector Spec figure F-1: TBT3 Discovery Flow, if the cable supports Intel SVID, Discover Mode SOP should be sent. BUG=b:154308721 BRANCH=None TEST=Tested on Volteer, able to enter Thunderbolt and USB4 mode with Passive Gen2 cables: 1. Supporting Intel SVID. 2. Not supporting Intel SVID. Signed-off-by: Ayushee Change-Id: I0a8ab913836b018547a5306dd82d3bed80273f87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2166741 Reviewed-by: Keith Short Reviewed-by: Vijay P Hiremath --- common/usb_pd_policy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/usb_pd_policy.c b/common/usb_pd_policy.c index ec5b9aba7c..51ed5113da 100644 --- a/common/usb_pd_policy.c +++ b/common/usb_pd_policy.c @@ -711,13 +711,13 @@ static int process_am_discover_svids(int port, int cnt, uint32_t *payload) limit_tbt_cable_speed(port); else disable_tbt_compat_mode(port); - } else { + } else if (!is_transmit_msg_sop_prime(port)) { enable_transmit_sop_prime(port); return dfp_discover_svids(payload); } - } - disable_transmit_sop_prime(port); + disable_transmit_sop_prime(port); + } return dfp_discover_modes(port, payload); } -- cgit v1.2.1