|
|
@@ -63,6 +63,7 @@ void ft232r_scan()
|
|
|
struct ft232r_device_info *info;
|
|
|
int err;
|
|
|
unsigned char buf[0x100];
|
|
|
+ int skipped = 0;
|
|
|
|
|
|
ft232r_scan_free();
|
|
|
|
|
|
@@ -76,6 +77,12 @@ void ft232r_scan()
|
|
|
ft232r_devinfo_list = malloc(sizeof(struct ft232r_device_info *) * (count + 1));
|
|
|
|
|
|
for (i = 0; i < count; ++i) {
|
|
|
+ if (bfg_claim_libusb(NULL, false, list[i]))
|
|
|
+ {
|
|
|
+ ++skipped;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
err = libusb_get_device_descriptor(list[i], &desc);
|
|
|
if (unlikely(err)) {
|
|
|
applog(LOG_ERR, "ft232r_scan: Error getting device descriptor: %s", bfg_strerror(err, BST_LIBUSB));
|
|
|
@@ -118,6 +125,9 @@ void ft232r_scan()
|
|
|
|
|
|
ft232r_devinfo_list[found] = NULL;
|
|
|
libusb_free_device_list(list, 1);
|
|
|
+
|
|
|
+ if (skipped)
|
|
|
+ applog(LOG_DEBUG, "%s: Skipping probe of %d claimed devices", __func__, skipped);
|
|
|
}
|
|
|
|
|
|
int ft232r_detect(const char *product_needle, const char *serial, foundusb_func_t cb)
|