|
|
@@ -275,8 +275,6 @@ modminer_reduce_clock(struct thr_info*thr, bool needlock)
|
|
|
if (needlock)
|
|
|
mutex_unlock(&modminer->device_mutex);
|
|
|
|
|
|
- applog(LOG_WARNING, "%s %u.%u: Setting clock speed to %u", modminer->api->name, modminer->device_id, fpgaid, state->clock);
|
|
|
-
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
@@ -315,6 +313,7 @@ modminer_fpga_init(struct thr_info *thr)
|
|
|
|
|
|
state->clock = 212; // Will be reduced to 210 by modminer_reduce_clock
|
|
|
modminer_reduce_clock(thr, false);
|
|
|
+ applog(LOG_WARNING, "%s %u.%u: Setting clock speed to %u", modminer->api->name, modminer->device_id, fpgaid, state->clock);
|
|
|
|
|
|
mutex_unlock(&modminer->device_mutex);
|
|
|
|
|
|
@@ -427,6 +426,7 @@ modminer_process_results(struct thr_info*thr)
|
|
|
if (state->last_cutoff_reduced != now) {
|
|
|
state->last_cutoff_reduced = now;
|
|
|
modminer_reduce_clock(thr, false);
|
|
|
+ applog(LOG_WARNING, "%s %u.%u: Drop clock speed to %u (temp: %d)", modminer->api->name, modminer->device_id, fpgaid, state->clock, temperature);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -443,18 +443,32 @@ modminer_process_results(struct thr_info*thr)
|
|
|
state->no_nonce_counter = 0;
|
|
|
bad = !test_nonce(work, nonce);
|
|
|
if (!bad)
|
|
|
+ {
|
|
|
+ ++state->good_share_counter;
|
|
|
submit_nonce(thr, work, nonce);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ if (unlikely((!state->good_share_counter) && nonce == 0xffffff00))
|
|
|
+ {
|
|
|
+ // Firmware returns 0xffffff00 immediately if we set clockspeed too high; but it's not a hw error and shouldn't affect future downclocking
|
|
|
+ modminer_reduce_clock(thr, true);
|
|
|
+ applog(LOG_WARNING, "%s %u.%u: Drop clock speed to %u (init)", modminer->api->name, modminer->device_id, fpgaid, state->clock);
|
|
|
+ }
|
|
|
else {
|
|
|
++hw_errors;
|
|
|
if (++modminer->hw_errors * 100 > 1000 + state->good_share_counter)
|
|
|
+ {
|
|
|
// Only reduce clocks if hardware errors are more than ~1% of results
|
|
|
modminer_reduce_clock(thr, true);
|
|
|
+ applog(LOG_WARNING, "%s %u.%u: Drop clock speed to %u (%d%% hw err)", modminer->api->name, modminer->device_id, fpgaid, state->clock, modminer->hw_errors * 100 / state->good_share_counter);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
if (++state->no_nonce_counter > 18000) {
|
|
|
state->no_nonce_counter = 0;
|
|
|
modminer_reduce_clock(thr, true);
|
|
|
+ applog(LOG_WARNING, "%s %u.%u: Drop clock speed to %u (no nonces)", modminer->api->name, modminer->device_id, fpgaid, state->clock);
|
|
|
}
|
|
|
if (work_restart(thr))
|
|
|
break;
|