summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-04-13 18:14:23 -0700
committerCommit Bot <commit-bot@chromium.org>2021-04-27 19:26:36 +0000
commit64a958827240c03d3096c60cf44882854464e340 (patch)
tree3976cf3b83640c4cfb3427427abb2e24b5b22de4
parent450d88fb41b6d31f5cd57e50fc16139f9a277bbe (diff)
downloadchrome-ec-64a958827240c03d3096c60cf44882854464e340.tar.gz
TCPMv2: PE: Refer to vconn swap policy for sop'/sop''
There is a vconn swap check in pe_attempt_discovery that is used to trigger a possible vconn role swap requeest. This check takes into account a board's specific policy (if necessary). But, a vconn role swap can also be triggered when sending a VDM message to SOP'/SOP''. In this case, board specific policy still needs to be checked. BUG=b:183026242 BRANCH=quiche TEST=tested on quiche and verified that there is no longer a continous stream of vconn swap attempts. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I5d239c78dc0d324e0c3dbb99dfc7fa093e2f6570 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2827510 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2854421 Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r--common/usbc/usb_pe_drp_sm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index 674c8de527..5c5e107333 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -5167,7 +5167,8 @@ static void pe_vdm_send_request_entry(int port)
if ((pe[port].tx_type == TCPC_TX_SOP_PRIME ||
pe[port].tx_type == TCPC_TX_SOP_PRIME_PRIME) &&
- !tc_is_vconn_src(port)) {
+ !tc_is_vconn_src(port) && port_discovery_vconn_swap_policy(port,
+ PE_FLAGS_VCONN_SWAP_TO_ON)) {
if (port_try_vconn_swap(port))
return;
}