From 931bdcc09a3d805cf25033951adb95c8e5159e46 Mon Sep 17 00:00:00 2001 From: Werner Johansson Date: Wed, 30 Jun 2010 18:42:21 -0700 Subject: [PATCH] Set explicit timeout on USB control transfer This attempts to solve the intermittent issues with serial number showing up as all question marks when issuing "fastboot devices" --- fastboot/usb_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fastboot/usb_linux.c b/fastboot/usb_linux.c index 2ce53eb83..78b7b9805 100644 --- a/fastboot/usb_linux.c +++ b/fastboot/usb_linux.c @@ -137,6 +137,7 @@ static int filter_usb_device(int fd, char *ptr, int len, int writable, ctrl.wIndex = 0; ctrl.wLength = sizeof(buffer); ctrl.data = buffer; + ctrl.timeout = 50; result = ioctl(fd, USBDEVFS_CONTROL, &ctrl); if (result > 0) {