diff options
author | Jett Rink <jettrink@chromium.org> | 2020-06-16 16:20:17 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-06 02:06:20 +0000 |
commit | d94d4cc45e39297cd4e072a07c8fca714715fa18 (patch) | |
tree | 19873d2936d701b02c7f778ab99166115d42a08a /common/usb_pd_tcpc.c | |
parent | 17fed25d34ec92fa0c7c3bfc738e4ca63c20bba4 (diff) | |
download | chrome-ec-d94d4cc45e39297cd4e072a07c8fca714715fa18.tar.gz |
tcpmc2: fix TD.PD.LL3.E2 Retransmission test
We are retrying in both the TCPC hardware (4 total) and
in the Protocol layer (3 total) when we do not get a GoodCRC back from
the port partner. We are only suppose to retry up to nRetryCount times
which is 2. This means we should be sending 3 total replies.
Also correct a misinterpretation of the spec around SOP' and SOP"
retries. We were not retrying those packets, but we should be retry them
as the SOP. The SOP' device will not retry, but we (as the SOP) should
retry packet that we are sending to them.
The TCPM is not fast enough to meet the timing for tRetry (195 usec), so
we need to perform the retries in the TCPC hardware layer.
BRANCH=none
BUG=b:150617035
TEST=Verify passing compliance test with GRL-C2 on Trembyle
Change-Id: I55c4ab2f5ce8f64acf21af943862d96d9088622d
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2248960
Diffstat (limited to 'common/usb_pd_tcpc.c')
-rw-r--r-- | common/usb_pd_tcpc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/usb_pd_tcpc.c b/common/usb_pd_tcpc.c index 5100319115..2878e53574 100644 --- a/common/usb_pd_tcpc.c +++ b/common/usb_pd_tcpc.c @@ -387,7 +387,8 @@ static int send_validate_message(int port, uint16_t header, uint8_t expected_msg_id = PD_HEADER_ID(header); uint8_t cnt = PD_HEADER_CNT(header); int retries = PD_HEADER_TYPE(header) == PD_DATA_SOURCE_CAP ? - 0 : PD_RETRY_COUNT; + 0 : + CONFIG_PD_RETRY_COUNT; /* retry 3 times if we are not getting a valid answer */ for (r = 0; r <= retries; r++) { |