summaryrefslogtreecommitdiff
path: root/common/usb_pd_protocol.c
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2020-04-27 15:40:39 -0600
committerCommit Bot <commit-bot@chromium.org>2020-04-28 22:35:36 +0000
commit0ec4d5f9a9c200c64ce8f1e5a4a43af006e5f73e (patch)
tree1655e851a3a7df67b7b2d3d8b7b6da3294bae593 /common/usb_pd_protocol.c
parentbff373fdcdcfb67e52e8d9ef9223f2474adcb9f3 (diff)
downloadchrome-ec-0ec4d5f9a9c200c64ce8f1e5a4a43af006e5f73e.tar.gz
TCPMv1: skip cable probing when not VCONN source
USB PD specification only permits the port that is currently sourcing VCONN to send SOP' and SOP'' messages to the cable. Ensure USB4 and TBT modes are not probed or entered if the EC is not sourcing VCONN. BUG=b:155073708 BRANCH=none TEST=make buildall TEST=connect Gatkex board to Volteer, with PD analyzer observe that when Gatkex claims VCONN source, EC code skips all SOP' messages but otherwise completes PD discovery. TEST=connect TBT dock, verify SOP' messages sent and TBT mode is entered. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ie7cf2910c0d9d78ba809ca25943585cfc96031a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2169476 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Ayushee Shah <ayushee.shah@intel.com>
Diffstat (limited to 'common/usb_pd_protocol.c')
-rw-r--r--common/usb_pd_protocol.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index e3d5503ea6..50a5b33750 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -2147,8 +2147,7 @@ static void pd_vdm_send_state_machine(int port)
{
int res;
uint16_t header;
- enum pd_msg_type msg_type =
- pd_msg_tx_type(port, pd[port].data_role, pd[port].flags);
+ enum pd_msg_type msg_type = pd_msg_tx_type(port);
switch (pd[port].vdm_state) {
case VDM_STATE_READY: