Only break out of usb_detect_one when a new device is found.
diff --git a/usbutils.c b/usbutils.c
index db2835a..ecb5aca 100644
--- a/usbutils.c
+++ b/usbutils.c
@@ -2232,6 +2232,8 @@ void __usb_detect(struct device_drv *drv, struct cgpu_info *(*device_detect)(str
found = usb_check(drv, list[i]);
if (found != NULL) {
+ bool new_dev = false;
+
if (is_in_use(list[i]) || cgminer_usb_lock(drv, list[i]) == false)
free(found);
else {
@@ -2239,13 +2241,14 @@ void __usb_detect(struct device_drv *drv, struct cgpu_info *(*device_detect)(str
if (!cgpu)
cgminer_usb_unlock(drv, list[i]);
else {
+ new_dev = true;
cgpu->usbinfo.initialised = true;
total_count++;
drv_count[drv->drv_id].count++;
}
free(found);
}
- if (single)
+ if (single && new_dev)
break;
}
}