From 231e33d5544722d27d08261275332072769e59bc Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 18:07:10 +0200 Subject: USB: Send a ZLP after mode switches to hopefully increase stability Sometimes devices do not switch modes, sending a zero length packet appears to fix this situation and prevents failures during restore. --- src/recovery.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/recovery.c') diff --git a/src/recovery.c b/src/recovery.c index 5b24e31..fc04b1a 100644 --- a/src/recovery.c +++ b/src/recovery.c @@ -298,6 +298,7 @@ int recovery_send_ibec(struct idevicerestore_client_t* client, plist_t build_ide error("ERROR: Unable to execute %s\n", component); return -1; } + irecv_control_transfer(client->recovery->client, 0x21, 1, 0, 0, 0, 0, 5000); return 0; } @@ -413,6 +414,8 @@ int recovery_send_kernelcache(struct idevicerestore_client_t* client, plist_t bu return -1; } + irecv_control_transfer(client->recovery->client, 0x21, 1, 0, 0, 0, 0, 5000); + return 0; } -- cgit v1.1-32-gdbae