am f41ee3d5: Merge "74602: Fixes adb not seeing connected devices on Mac."
* commit 'f41ee3d5a1f236b0770d1ebd7068606aea7288bd': 74602: Fixes adb not seeing connected devices on Mac.
This commit is contained in:
commit
99bb69c1ce
1 changed files with 9 additions and 5 deletions
|
|
@ -513,14 +513,18 @@ int usb_read(usb_handle *handle, void *buf, int len)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
result =
|
result = (*handle->interface)->ReadPipe(handle->interface, handle->bulkIn, buf, &numBytes);
|
||||||
(*handle->interface)->ReadPipe(handle->interface,
|
|
||||||
handle->bulkIn, buf, &numBytes);
|
|
||||||
|
|
||||||
if (0 == result)
|
if (kIOUSBPipeStalled == result) {
|
||||||
|
DBG(" Pipe stalled, clearing stall.\n");
|
||||||
|
(*handle->interface)->ClearPipeStall(handle->interface, handle->bulkIn);
|
||||||
|
result = (*handle->interface)->ReadPipe(handle->interface, handle->bulkIn, buf, &numBytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (kIOReturnSuccess == result)
|
||||||
return 0;
|
return 0;
|
||||||
else {
|
else {
|
||||||
DBG("ERR: usb_read failed with status %d\n", result);
|
DBG("ERR: usb_read failed with status %x\n", result);
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue