summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Benjamin BOURGEAIS2021-04-30 10:02:43 +0200
committerGravatar Benjamin BOURGEAIS2021-05-08 08:23:06 +0200
commit5e484e18f1383b5a0bd6c353ab1d668b03e4ffab (patch)
tree6065e2191b3967ec68560652d4b3caaa45d9328e
parentbb04e78eee0de10db3661ce6e29cf90fbff2a25d (diff)
downloadusbmuxd-5e484e18f1383b5a0bd6c353ab1d668b03e4ffab.tar.gz
usbmuxd-5e484e18f1383b5a0bd6c353ab1d668b03e4ffab.tar.bz2
usb: Enable Apple Silicon restore mode
-rw-r--r--src/usb.c3
-rw-r--r--src/usb.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/usb.c b/src/usb.c
index abc4a2b..9c30055 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -381,7 +381,8 @@ static int usb_device_add(libusb_device* dev)
381 if(devdesc.idVendor != VID_APPLE) 381 if(devdesc.idVendor != VID_APPLE)
382 return -1; 382 return -1;
383 if((devdesc.idProduct != PID_APPLE_T2_COPROCESSOR) && 383 if((devdesc.idProduct != PID_APPLE_T2_COPROCESSOR) &&
384 ((devdesc.idProduct < PID_RANGE_LOW) || 384 (devdesc.idProduct != PID_APPLE_SILICON_RESTORE) &&
385 ((devdesc.idProduct < PID_RANGE_LOW) ||
385 (devdesc.idProduct > PID_RANGE_MAX))) 386 (devdesc.idProduct > PID_RANGE_MAX)))
386 return -1; 387 return -1;
387 libusb_device_handle *handle; 388 libusb_device_handle *handle;
diff --git a/src/usb.h b/src/usb.h
index 18f2a72..80ec6fc 100644
--- a/src/usb.h
+++ b/src/usb.h
@@ -47,6 +47,7 @@
47#define PID_RANGE_LOW 0x1290 47#define PID_RANGE_LOW 0x1290
48#define PID_RANGE_MAX 0x12af 48#define PID_RANGE_MAX 0x12af
49#define PID_APPLE_T2_COPROCESSOR 0x8600 49#define PID_APPLE_T2_COPROCESSOR 0x8600
50#define PID_APPLE_SILICON_RESTORE 0x1901
50 51
51struct usb_device; 52struct usb_device;
52 53