diff options
author | Yilun Lin <yllin@chromium.org> | 2019-08-15 11:16:20 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-08-25 14:00:29 +0000 |
commit | e52f9b778894f07d67e76f2516193fa4c8c995b2 (patch) | |
tree | ddb0f26b66df2fcce06c5abdb522724d54d95165 /include | |
parent | 1830e59046b7f1482c8effb3e3541441499dddaa (diff) | |
download | chrome-ec-e52f9b778894f07d67e76f2516193fa4c8c995b2.tar.gz |
tcpm: ignore repeated MessageID
Ignore repeated MessageID in TCPM rather than TCPC[1].
https://crrev.com/c/1513033 implemented the logic in TCPC, but
according to spec[2], TCPC should pass repeated messages to TCPM.
This CL simply moves the logic from TCPC to TCPM.
[1] USB PD spec rev3.0
6.7.1.2 MessageID Counter Receiver Usage
[2] USB Port Controller spec rev2.0
3.3 USB-PD Message Delivery
* MessageID is not checked in the TCPC when a non-GoodCRC message
is received. Retried messages that are received are passed to
the TCPM via I2C
BUG=b:134556286, b:129337537
BRANCH=None
TEST=make buildall -j; See Krane boots; See servo_v4 boots.
Ensure repeat request message triggered artificially are dropped
without any side-effects.
Cq-Depend: chromium:1763895
Change-Id: I362056d973a71f0940b1287511ffe9180f566fac
Signed-off-by: Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1757596
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb_pd_tcpc.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/usb_pd_tcpc.h b/include/usb_pd_tcpc.h index 3f6fa2d139..4ac22d4d86 100644 --- a/include/usb_pd_tcpc.h +++ b/include/usb_pd_tcpc.h @@ -63,22 +63,4 @@ int tcpc_transmit(int port, enum tcpm_transmit_type type, uint16_t header, int rx_buf_is_empty(int port); void rx_buf_clear(int port); -/** - * Invalidate last message received at the port when the port gets disconnected - * or reset(soft/hard). This is used to identify and handle the duplicate - * messages. - * - * @param port USB PD TCPC port number - */ -void invalidate_last_message_id(int port); - -/** - * Identify and drop any duplicate messages received at the port. - * - * @param port USB PD TCPC port number - * @param msg_header Message Header containing the RX message ID - * @return 1 if the received message is a duplicate one, 0 otherwise. - */ -int consume_repeat_message(int port, uint16_t msg_header); - #endif /* __CROS_EC_USB_PD_TCPC_H */ |