summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-01-05 08:05:56 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-05 19:11:03 +0000
commit20cf37346380606299b299caee0c7f8f23803981 (patch)
treed87fb283fa79fdc9058bce9b78a562c645f4eaff
parent3725b32aa560d4ace83579faf629286b8cb88b9c (diff)
downloadchrome-ec-20cf37346380606299b299caee0c7f8f23803981.tar.gz
pd: change receive timeout to 1.8ms
Change PD receive timeout to 1.8ms. The max packet ever received should be ~1.59ms, so this should be safe. BUG=chrome-os-partner:33693 BRANCH=samus TEST=load onto zinger and samus and connect a bunch of times. also tested with PD communication disabled on samus and verified that zinger sends source cap 50 times (each with 4 retries) and then stops. Change-Id: If82b2905d6f9118956229682d7f259fb94da0258 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/238305 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--common/usb_pd_protocol.c2
-rw-r--r--include/usb_pd.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 124b9f9bc2..3e65d4f905 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -491,7 +491,7 @@ static int send_validate_message(int port, uint16_t header,
*/
if (r) {
pd_rx_enable_monitoring(port);
- /* Message receive timeout is 2.7ms */
+ /* Wait for message receive timeout */
if (task_wait_event(USB_PD_RX_TMOUT_US) ==
TASK_EVENT_TIMER)
continue;
diff --git a/include/usb_pd.h b/include/usb_pd.h
index f04281140e..b9e4ee0d6e 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -544,7 +544,7 @@ struct pd_policy {
#define USB_VID_GOOGLE 0x18d1
/* Timeout for message receive in microseconds */
-#define USB_PD_RX_TMOUT_US 2700
+#define USB_PD_RX_TMOUT_US 1800
/* --- Protocol layer functions --- */