From 20cf37346380606299b299caee0c7f8f23803981 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Mon, 5 Jan 2015 08:05:56 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/238305 Reviewed-by: Vincent Palatin --- common/usb_pd_protocol.c | 2 +- include/usb_pd.h | 2 +- 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 --- */ -- cgit v1.2.1