summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2014-05-06 02:27:42 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-06 02:27:42 +0000
commit6d9ae28ed4ea917e3c6db12228b2b06d02489c11 (patch)
treeb2887ec6865c4c85ef2a57d8bb10d9517604ec6f
parentfdadb420afa3419058a3be46dc797f017e7290de (diff)
parent8e26b2522267658ef996631a3a43818c1baf6fc3 (diff)
downloadsystem_core-6d9ae28ed4ea917e3c6db12228b2b06d02489c11.zip
system_core-6d9ae28ed4ea917e3c6db12228b2b06d02489c11.tar.gz
system_core-6d9ae28ed4ea917e3c6db12228b2b06d02489c11.tar.bz2
am 8e26b252: Merge "Fastboot: fix fastboot timeout issue of Windows host side"
* commit '8e26b2522267658ef996631a3a43818c1baf6fc3': Fastboot: fix fastboot timeout issue of Windows host side
-rw-r--r--fastboot/usb_windows.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fastboot/usb_windows.c b/fastboot/usb_windows.c
index 07f7be2..f666015 100644
--- a/fastboot/usb_windows.c
+++ b/fastboot/usb_windows.c
@@ -152,7 +152,7 @@ usb_handle* do_usb_open(const wchar_t* interface_name) {
}
int usb_write(usb_handle* handle, const void* data, int len) {
- unsigned long time_out = 500 + len * 8;
+ unsigned long time_out = 5000;
unsigned long written = 0;
unsigned count = 0;
int ret;
@@ -194,7 +194,7 @@ int usb_write(usb_handle* handle, const void* data, int len) {
}
int usb_read(usb_handle *handle, void* data, int len) {
- unsigned long time_out = 500 + len * 8;
+ unsigned long time_out = 0;
unsigned long read = 0;
int ret;
@@ -212,7 +212,7 @@ int usb_read(usb_handle *handle, void* data, int len) {
DBG("usb_read got: %ld, expected: %d, errno: %d\n", read, xfer, errno);
if (ret) {
return read;
- } else if (errno != ERROR_SEM_TIMEOUT) {
+ } else {
// assume ERROR_INVALID_HANDLE indicates we are disconnected
if (errno == ERROR_INVALID_HANDLE)
usb_kick(handle);