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"
This commit is contained in:
Werner Johansson 2010-06-30 18:42:21 -07:00 committed by Dima Zavin
parent eb42170e6c
commit 931bdcc09a

View file

@ -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) {