Make hashfast reset counter rise on old instances when inheriting the value on new ones
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 7d154a5..ab18804 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -762,7 +762,7 @@ static bool hfa_detect_common(struct cgpu_info *hashfast)
applog(LOG_NOTICE, "%s: Found old instance by op name %s at device %d",
hashfast->drv->name, info->op_name, info->old_cgpu->device_id);
- info->resets = cinfo->resets;
+ info->resets = ++cinfo->resets;
info->hash_clock_rate = cinfo->hash_clock_rate;
} else {
applog(LOG_NOTICE, "%s: Found device with name %s", hashfast->drv->name,
@@ -1311,7 +1311,7 @@ static bool hfa_init(struct thr_info *thr)
applog(LOG_NOTICE, "%s: Found old instance by serial number %08x at device %d",
hashfast->drv->name, info->serial_number, info->old_cgpu->device_id);
- info->resets = cinfo->resets;
+ info->resets = ++cinfo->resets;
/* Set the device with the last hash_clock_rate if it's
* different. */
if (info->hash_clock_rate != cinfo->hash_clock_rate) {
@@ -1600,8 +1600,6 @@ static void hfa_running_shutdown(struct cgpu_info *hashfast, struct hashfast_inf
{
int iruntime = cgpu_runtime(hashfast);
- info->resets++;
-
/* If the device has already disapperaed, don't drop the clock in case
* it was just unplugged as opposed to a failure. */
if (hashfast->usbinfo.nodev)