summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKeith Short <keithshort@chromium.org>2021-02-11 12:31:52 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-16 17:07:21 +0000
commitf525ac0bd0619caee49f51790b6a7a7997ab884a (patch)
tree19a3374faf54f4386eaf8e39a4991e7f54ed0f30 /test
parentb835c2feb06e72b48ef82845e114bb8af5d7145e (diff)
downloadchrome-ec-f525ac0bd0619caee49f51790b6a7a7997ab884a.tar.gz
tcpmv2: Only issue SOP' soft reset following PR swap
Entry to the PE_SNK_Startup and PE_SRC_Startup states resets the protocol layer, and clears the message IDs for all SOP types. These states are entered during initial connect, hard reset, and after a power role swap. The cable should automatically clear it's message IDs on the initial connect (because it didn't have power) and on a hard reset, so modify the PE policy to only send SOP' soft reset after power role swaps. BUG=b:179325862 BRANCH=volteer TEST=Connect TBT loopback device, verify no SOP' soft reset is sent and that TBT entry is successful. TEST=Connect USB+DP monitor when EC starts as SRC/DFP and VCONN source. Verify EC sends SOP' soft reset is sent after power role swap. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2c133eec0e76c1ecb7b79cea94a541fdb55ee9c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691423 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'test')
-rw-r--r--test/usb_pe_drp.c10
-rw-r--r--test/usb_tcpmv2_compliance_common.c8
2 files changed, 0 insertions, 18 deletions
diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c
index beb54c82cb..2644ded63b 100644
--- a/test/usb_pe_drp.c
+++ b/test/usb_pe_drp.c
@@ -110,16 +110,6 @@ test_static int finish_src_discovery(int startup_cable_probes)
PDO_FIXED(5000, 500, PDO_FIXED_COMM_CAP));
/*
- * Cable soft reset is always issued after entry into Src/Snk_Ready
- * simulate no cable response.
- */
- TEST_EQ(mock_prl_wait_for_tx_msg(PORT0, TCPC_TX_SOP_PRIME,
- PD_CTRL_SOFT_RESET, 0,
- 60 * MSEC),
- EC_SUCCESS, "%d");
- mock_prl_report_error(PORT0, ERR_TCH_XMIT, TCPC_TX_SOP_PRIME);
-
- /*
* Cable identity discovery is attempted 6 times total. 1 was done
* above, so expect 5 more now.
*/
diff --git a/test/usb_tcpmv2_compliance_common.c b/test/usb_tcpmv2_compliance_common.c
index 0a1449ede3..5273948de3 100644
--- a/test/usb_tcpmv2_compliance_common.c
+++ b/test/usb_tcpmv2_compliance_common.c
@@ -379,14 +379,6 @@ int handle_attach_expected_msgs(enum pd_data_role data_role)
task_wait_event(10 * MSEC);
partner_send_msg(PD_MSG_SOP, PD_DATA_SINK_CAP, 1, 0, &pdo);
- TEST_EQ(verify_tcpci_transmit(TCPC_TX_SOP_PRIME,
- PD_CTRL_SOFT_RESET, 0),
- EC_SUCCESS, "%d");
- mock_set_alert(TCPC_REG_ALERT_TX_SUCCESS);
- task_wait_event(10 * MSEC);
- partner_send_msg(PD_MSG_SOP_PRIME, PD_CTRL_NOT_SUPPORTED, 0, 0,
- NULL);
-
TEST_EQ(verify_tcpci_transmit(TCPC_TX_SOP_PRIME, 0,
PD_DATA_VENDOR_DEF),
EC_SUCCESS, "%d");