summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Hector Martin2021-09-25 01:29:07 +0900
committerGravatar Hector Martin2021-09-25 01:29:07 +0900
commite3a3180b9b380ce9092ee0d7b8e9d82d66b1c261 (patch)
tree58c51db870cadca3c43b4844d57b3fd56c0cff36 /src
parentf0ca69d9b1f488e4eca7e1095190ededc76f3507 (diff)
downloadusbmuxd-e3a3180b9b380ce9092ee0d7b8e9d82d66b1c261.tar.gz
usbmuxd-e3a3180b9b380ce9092ee0d7b8e9d82d66b1c261.tar.bz2
usb: Add more Apple Silicon retstore PIDs
1904 is the M1 iMac; presumably this is now a range Signed-off-by: Hector Martin <marcan@marcan.st>
Diffstat (limited to 'src')
-rw-r--r--src/usb.c3
-rw-r--r--src/usb.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/usb.c b/src/usb.c
index 388b6f3..4ff2d07 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -383,7 +383,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_APPLE_SILICON_RESTORE) &&
+ ((devdesc.idProduct < PID_APPLE_SILICON_RESTORE_LOW) ||
+ (devdesc.idProduct > PID_APPLE_SILICON_RESTORE_MAX)) &&
((devdesc.idProduct < PID_RANGE_LOW) ||
(devdesc.idProduct > PID_RANGE_MAX)))
return -1;
diff --git a/src/usb.h b/src/usb.h
index 80ec6fc..ee74685 100644
--- a/src/usb.h
+++ b/src/usb.h
@@ -47,7 +47,8 @@
#define PID_RANGE_LOW 0x1290
#define PID_RANGE_MAX 0x12af
#define PID_APPLE_T2_COPROCESSOR 0x8600
-#define PID_APPLE_SILICON_RESTORE 0x1901
+#define PID_APPLE_SILICON_RESTORE_LOW 0x1901
+#define PID_APPLE_SILICON_RESTORE_MAX 0x1904
struct usb_device;