summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2016-06-26 16:15:54 +0200
committerGravatar Nikias Bassen2016-06-26 16:15:54 +0200
commit686d6d72d56e700c13abbb75a31ecb385658d96d (patch)
treea0d1eeace97278b9b81a5b6803896c12195e7e5d /src
parentc22fb01537f39cc1288b860b24a8ae48e49f06f9 (diff)
downloadlibirecovery-686d6d72d56e700c13abbb75a31ecb385658d96d.tar.gz
libirecovery-686d6d72d56e700c13abbb75a31ecb385658d96d.tar.bz2
IOKit: Make sure to re-enumerate devices after device reset
Diffstat (limited to 'src')
-rw-r--r--src/libirecovery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 33711c2..3b12dd5 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -1404,6 +1404,11 @@ IRECV_API irecv_error_t irecv_reset(irecv_client_t client) {
debug("error sending device reset: %#x\n", result);
return IRECV_E_UNKNOWN_ERROR;
}
+
+ result = (*client->handle)->USBDeviceReEnumerate(client->handle, 0);
+ if (result != kIOReturnSuccess && result != kIOReturnNotResponding) {
+ debug("error re-enumerating device: %#x (ignored)\n", result);
+ }
#else
libusb_reset_device(client->handle);
#endif