summaryrefslogtreecommitdiff
path: root/common
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-24 23:42:13 +0000
commit5677abb412002210f951fff65df588f13826ca63 (patch)
tree2c2053e169f1022e95e6f943f370293a0f6680ac /common
parent4ac1d81e1430dbfbfba1376a23ab19dfa845d7ef (diff)
downloadchrome-ec-5677abb412002210f951fff65df588f13826ca63.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>
Diffstat (limited to 'common')
-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 75e78039a8..98bd9e8299 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -5180,7 +5180,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;
}