From 5e484e18f1383b5a0bd6c353ab1d668b03e4ffab Mon Sep 17 00:00:00 2001 From: Benjamin BOURGEAIS Date: Fri, 30 Apr 2021 10:02:43 +0200 Subject: usb: Enable Apple Silicon restore mode --- src/usb.c | 3 ++- src/usb.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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) if(devdesc.idVendor != VID_APPLE) return -1; if((devdesc.idProduct != PID_APPLE_T2_COPROCESSOR) && - ((devdesc.idProduct < PID_RANGE_LOW) || + (devdesc.idProduct != PID_APPLE_SILICON_RESTORE) && + ((devdesc.idProduct < PID_RANGE_LOW) || (devdesc.idProduct > PID_RANGE_MAX))) return -1; 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 @@ #define PID_RANGE_LOW 0x1290 #define PID_RANGE_MAX 0x12af #define PID_APPLE_T2_COPROCESSOR 0x8600 +#define PID_APPLE_SILICON_RESTORE 0x1901 struct usb_device; -- cgit v1.1-32-gdbae