diff options
author | Jonathan Brandmeyer <jbrandmeyer@chromium.org> | 2018-10-03 09:16:33 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-10-04 17:09:01 -0700 |
commit | 31fe290061fdf9d1b0e8a634c77cb7a30b2f012b (patch) | |
tree | 4c86c978f86dce2e5868f71a0e756bb38cbaf7af /include/usb_pd_tcpc.h | |
parent | 356083b7f0b36ffd5b8d387e332ff488810ed47e (diff) | |
download | chrome-ec-31fe290061fdf9d1b0e8a634c77cb7a30b2f012b.tar.gz |
tcpc: Resume suspended ports after an interval
When it appears that the TCPC queue handling logic may be stuck in an
infinite loop, the EC will break the loop by disabling the port in order
to avoid task starvation. However, nothing attempts to resume the port,
and it therefore remains disabled until the next EC reset. Wake back up
after a reasonable interval in order to automatically retry. On port
suspend, completely drain the TCPM message queue.
BUG=chromium:891713
TEST=On Careena hardware, with analogix TCPC firmware v1.5 and an
electronically marked cable that sends SOP' messages, verify that the EC
auto-retries every second. After removing the offending cable, and PD
power supply will work.
BRANCH=grunt
Change-Id: I563b763501333eb36ee1f76e6f484ebb3245c82a
Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1258571
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpc.h')
-rw-r--r-- | include/usb_pd_tcpc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/usb_pd_tcpc.h b/include/usb_pd_tcpc.h index 2c2da66c84..812a194a85 100644 --- a/include/usb_pd_tcpc.h +++ b/include/usb_pd_tcpc.h @@ -58,5 +58,6 @@ int tcpc_get_message(int port, uint32_t *payload, int *head); int tcpc_transmit(int port, enum tcpm_transmit_type type, uint16_t header, const uint32_t *data); int rx_buf_is_empty(int port); +void rx_buf_clear(int port); #endif /* __CROS_EC_USB_PD_TCPC_H */ |