diff options
author | Ayushee <ayushee.shah@intel.com> | 2020-08-21 11:14:20 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-28 23:02:02 +0000 |
commit | 2d87a73bf82b100a7b560b4a4f7a48b4f21ea469 (patch) | |
tree | 2c363d0d0c83fef432e44212718f99654133fff9 /common/usbc/tbt_alt_mode.c | |
parent | 10cecaa15837579b6e52091507da003287c8e692 (diff) | |
download | chrome-ec-2d87a73bf82b100a7b560b4a4f7a48b4f21ea469.tar.gz |
TCPMv2: Send SOP'/SOP'' VDM only when the port is VCONN src
According to USB PD spec, section 2.5.4, only VCONN source can
communicate with the cable plug. This CL checks if the port is the VCONN
before sending SOP'/SOP'' messages.
If there is a VCONN source failure, port retries swapping the VCONN times
before marking the VDM as failed/naked.
The CL also enables falling back to DP mode in case enter mode thunderbolt
fails.
BUG=b:148528713
BRANCH=None
TEST=Tested on volteer, the port sends SOP'/SOP'' VDMs to the cable
only if it's the VCONN source
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Change-Id: I5880104a7a42b3e7de9e472affd41e937d36f9a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368066
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usbc/tbt_alt_mode.c')
-rw-r--r-- | common/usbc/tbt_alt_mode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usbc/tbt_alt_mode.c b/common/usbc/tbt_alt_mode.c index 6baa2e75d7..4b79f26efb 100644 --- a/common/usbc/tbt_alt_mode.c +++ b/common/usbc/tbt_alt_mode.c @@ -419,7 +419,7 @@ int tbt_setup_next_vdm(int port, int vdo_count, uint32_t *vdm, break; case TBT_INACTIVE: /* Thunderbolt mode is inactive */ - return -1; + return 0; default: CPRINTF("%s called with invalid state %d\n", __func__, tbt_state[port]); |