summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpm.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2021-03-11 11:11:14 -0800
committerCommit Bot <commit-bot@chromium.org>2021-03-31 19:29:58 +0000
commit7285b915683d22675be649776009cac268182130 (patch)
tree8f7ba26a544b0439019b9475bec72be52812fb3d /include/usb_pd_tcpm.h
parent3734bffbe0538101dec858b60542a5a40fe2bb81 (diff)
downloadchrome-ec-7285b915683d22675be649776009cac268182130.tar.gz
TCPMv2: PRL: Enahnce support for the tx message discard path
This CL modifies the tx message discard path in the PRL. The states that should have triggered tx message discard events, would only act on messages pending from PE, but not passed yet to the phy. This behavior was required to account for the serial nature of the different PRL state machines and inherent delay in sending/receiving messages to/from off chip TCPCs via the I2C bus. This CL adds a new WAIT value to the xmit_status enum so that a message being sent to the phy but not reponse yet can be known. In addition, xmit_status == DISCARDED is no longer treated automatically as a protocol error. BUG=b:181179550,b:173028144 BRANCH=None TEST=Running VDMU.E16 compliance test. Validated that the SVDM command sequence is properly interrupted in most all cases. This test only fails if collision events are present which is a happening on honybuns for 2 reasons: 1) GRL test waits too long to interrupt the VDM command (~1 msec) 2) honeybuns ucpd is faster since it doesn't have i2c delays. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I2bec09b96d7f6ea6122fcb369246717950987ca8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752251 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r--include/usb_pd_tcpm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 8e461b43b6..df195d1832 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -81,9 +81,10 @@ enum tcpm_transmit_type {
enum tcpc_transmit_complete {
TCPC_TX_UNSET = -1,
- TCPC_TX_COMPLETE_SUCCESS = 0,
- TCPC_TX_COMPLETE_DISCARDED = 1,
- TCPC_TX_COMPLETE_FAILED = 2,
+ TCPC_TX_WAIT = 0,
+ TCPC_TX_COMPLETE_SUCCESS = 1,
+ TCPC_TX_COMPLETE_DISCARDED = 2,
+ TCPC_TX_COMPLETE_FAILED = 3,
};
/*