MMQ count work check timeout failures
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/driver-modminer.c b/driver-modminer.c
index ab79fae..f95c031 100644
--- a/driver-modminer.c
+++ b/driver-modminer.c
@@ -898,8 +898,10 @@ static uint64_t modminer_process_results(struct thr_info *thr)
// timeoutloop never resets so the timeouts can't
// accumulate much during a single item of work
- if (err == LIBUSB_ERROR_TIMEOUT && ++timeoutloop < 10)
+ if (err == LIBUSB_ERROR_TIMEOUT && ++timeoutloop < 10) {
+ state->timeout_fail++;
goto tryagain;
+ }
applog(LOG_ERR, "%s%u: Error sending (get nonce) (%d:%d)",
modminer->api->name, modminer->device_id, amount, err);
@@ -923,8 +925,10 @@ static uint64_t modminer_process_results(struct thr_info *thr)
if (err < 0 || amount < 4) {
// timeoutloop never resets so the timeouts can't
// accumulate much during a single item of work
- if (err == LIBUSB_ERROR_TIMEOUT && ++timeoutloop < 10)
+ if (err == LIBUSB_ERROR_TIMEOUT && ++timeoutloop < 10) {
+ state->timeout_fail++;
goto tryagain;
+ }
applog(LOG_ERR, "%s%u: Error reading (get nonce) (%d:%d)",
modminer->api->name, modminer->device_id, amount+amount2, err);
diff --git a/miner.h b/miner.h
index ac8acc7..b0659d9 100644
--- a/miner.h
+++ b/miner.h
@@ -1033,6 +1033,7 @@ struct modminer_fpga_state {
uint32_t shares_last_hw;
uint32_t hw_errors;
uint32_t shares_to_good;
+ uint32_t timeout_fail;
uint32_t success_more;
struct timeval last_changed;
struct timeval last_nonce;