60 lines
2.1 KiB
Diff
60 lines
2.1 KiB
Diff
From 29da99a0d523708c05560c4c6ebe98a42cec50a8 Mon Sep 17 00:00:00 2001
|
|
From: LuK1337 <priv.luk@gmail.com>
|
|
Date: Sun, 23 Feb 2025 19:05:38 +0100
|
|
Subject: [PATCH] Disable libusb SuperSpeed+ support
|
|
|
|
Not available in any released libusb version.
|
|
---
|
|
vendor/adb/client/usb_libusb.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/vendor/adb/client/usb_libusb.cpp b/vendor/adb/client/usb_libusb.cpp
|
|
index 46d8464..20e171b 100644
|
|
--- a/vendor/adb/client/usb_libusb.cpp
|
|
+++ b/vendor/adb/client/usb_libusb.cpp
|
|
@@ -503,8 +503,10 @@ struct LibusbConnection : public Connection {
|
|
return 5000;
|
|
case LIBUSB_SPEED_SUPER_PLUS:
|
|
return 10000;
|
|
+#if 0
|
|
case LIBUSB_SPEED_SUPER_PLUS_X2:
|
|
return 20000;
|
|
+#endif
|
|
case LIBUSB_SPEED_UNKNOWN:
|
|
default:
|
|
return 0;
|
|
@@ -536,6 +538,7 @@ struct LibusbConnection : public Connection {
|
|
}
|
|
}
|
|
|
|
+#if 0
|
|
static uint64_t ExtractMaxSuperSpeedPlus(libusb_ssplus_usb_device_capability_descriptor* cap) {
|
|
// The exponents is one of {bytes, kB, MB, or GB}. We express speed in MB so we use a 0
|
|
// multiplier for value which would result in 0MB anyway.
|
|
@@ -548,6 +551,7 @@ struct LibusbConnection : public Connection {
|
|
}
|
|
return max_speed;
|
|
}
|
|
+#endif
|
|
|
|
void RetrieveSpeeds() {
|
|
negotiated_speed_ = ToConnectionSpeed(libusb_get_device_speed(device_.get()));
|
|
@@ -570,6 +574,7 @@ struct LibusbConnection : public Connection {
|
|
libusb_free_ss_usb_device_capability_descriptor(cap);
|
|
}
|
|
} break;
|
|
+#if 0
|
|
case LIBUSB_BT_SUPERSPEED_PLUS_CAPABILITY: {
|
|
libusb_ssplus_usb_device_capability_descriptor* cap = nullptr;
|
|
if (!libusb_get_ssplus_usb_device_capability_descriptor(
|
|
@@ -578,6 +583,7 @@ struct LibusbConnection : public Connection {
|
|
libusb_free_ssplus_usb_device_capability_descriptor(cap);
|
|
}
|
|
} break;
|
|
+#endif
|
|
default:
|
|
break;
|
|
}
|
|
--
|
|
2.48.1
|
|
|