summaryrefslogtreecommitdiff
path: root/common/usbc/usb_pe_drp_sm.c
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-03-03 18:29:15 -0800
committerCommit Bot <commit-bot@chromium.org>2021-03-19 02:42:40 +0000
commit1720f734983ab6452884573e3a7c8e184d28cef7 (patch)
treecb70a8370f951218755645d34ab86a2a03494fc5 /common/usbc/usb_pe_drp_sm.c
parentcb20783554410be144f1b552f6677fbc50b53a9a (diff)
downloadchrome-ec-1720f734983ab6452884573e3a7c8e184d28cef7.tar.gz
TCPMv2: PRL: Don't report ERR_RCH_CHUNKED to PE for timeout
This CL adds a new RCH error type used for the case when there was a sender response timeout waiting for the next chunk of a chunked message to be received. This particular error should not result in the PE triggering a soft reset. This new error type allows the PE function to do nothing for this error case. All other RCH error states remain the same. This change is required to pass the TD.PD.SRC3.E32 compliance test where the tester purposely stops sending after the 4th chunk and expects to be able to resend that message without an protocol error being reported. BUG=b:181333342,b:179443762 BRANCH=None TEST=Verified that quiche can now pass TD.PD.SRC3.E32 Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I0142ca8d23cd23ef7b347d5c07155cdb17f44b88 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2734158 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'common/usbc/usb_pe_drp_sm.c')
-rw-r--r--common/usbc/usb_pe_drp_sm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/usbc/usb_pe_drp_sm.c b/common/usbc/usb_pe_drp_sm.c
index 4e9d1b2c44..e3c3ee4627 100644
--- a/common/usbc/usb_pe_drp_sm.c
+++ b/common/usbc/usb_pe_drp_sm.c
@@ -1126,6 +1126,13 @@ void pe_report_error(int port, enum pe_error e, enum tcpm_transmit_type type)
assert(port == TASK_ID_TO_PD_PORT(task_get_current()));
/*
+ * If there is a timeout error while waiting for a chunk of a chunked
+ * message, there is no requirement to trigger a soft reset.
+ */
+ if (e == ERR_RCH_CHUNK_WAIT_TIMEOUT)
+ return;
+
+ /*
* Generate Hard Reset if Protocol Error occurred
* while in PE_Send_Soft_Reset state.
*/