summaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <badhri@google.com>2018-06-27 21:37:27 -0700
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-08-16 16:39:04 +0000
commita063ae4f55d5de60f12350759987ce2dc0baee2a (patch)
tree0031d5a1c0821b832354e119b2ac55c7a0d8a7a6 /usb
parent4632dabb4e1306d28240fe79d07b72f0d626d6d1 (diff)
downloaddevice_google_wahoo-a063ae4f55d5de60f12350759987ce2dc0baee2a.tar.gz
device_google_wahoo-a063ae4f55d5de60f12350759987ce2dc0baee2a.tar.bz2
device_google_wahoo-a063ae4f55d5de60f12350759987ce2dc0baee2a.zip
usb gadget hal: Increase disconnect timeout
Increase disconnect timeout from 10ms to 100ms for the host ports which dont strictly adhere to the spec to sense disconnect. This is a work around given that some of the root ports dont detect it. From the USB 2.0 spec guidelines, the disconnect should be detected in 2.5us. From the USB 2.0 spec (pg 186) Time to detect a disconnect event at a hub’s downstream facing port TDDIS Section 7.1.7.3 2 2.5 µs Bug: 110412433 Test: Walleye entering accessory mode in USB 3.0 with IOGear cable and USB 3.0 host. Change-Id: I8d8f62dc1a7bcbc9c7727c51cad7f3cb07ba6b50 (cherry picked from commit 28ad0a90cfc35817fdff097a6a3ed73251c24800)
Diffstat (limited to 'usb')
-rw-r--r--usb/UsbGadget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/usb/UsbGadget.cpp b/usb/UsbGadget.cpp
index 603afbba..66ac85e5 100644
--- a/usb/UsbGadget.cpp
+++ b/usb/UsbGadget.cpp
@@ -30,7 +30,7 @@ constexpr int BUFFER_SIZE = 512;
constexpr int MAX_FILE_PATH_LENGTH = 256;
constexpr int EPOLL_EVENTS = 10;
constexpr bool DEBUG = false;
-constexpr int DISCONNECT_WAIT_US = 10000;
+constexpr int DISCONNECT_WAIT_US = 100000;
#define BUILD_TYPE "ro.build.type"
#define GADGET_PATH "/config/usb_gadget/g1/"