From 74b96d4b3f6b6d5d6fea43bb0e619cec85e1f5cd Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 6 Jul 2012 15:05:38 +1000 Subject: [PATCH] Use a much shorter initial sleep time to account for faster devices and nonce range working, and increase it if nonce range fails to work. --- driver-bitforce.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driver-bitforce.c b/driver-bitforce.c index 21569486..c1f10b5e 100644 --- a/driver-bitforce.c +++ b/driver-bitforce.c @@ -20,7 +20,7 @@ #include "fpgautils.h" #include "miner.h" -#define BITFORCE_SLEEP_MS 3000 +#define BITFORCE_SLEEP_MS 666 #define BITFORCE_TIMEOUT_MS 7000 #define BITFORCE_LONG_TIMEOUT_MS 15000 #define BITFORCE_CHECK_INTERVAL_MS 10 @@ -278,6 +278,7 @@ re_send: if (bitforce->nonce_range) { applog(LOG_DEBUG, "BFL%i: Disabling nonce range support", bitforce->device_id); bitforce->nonce_range = false; + bitforce->sleep_ms *= 5; goto re_send; } applog(LOG_ERR, "BFL%i: Error: Send work reports: %s", bitforce->device_id, pdevbuf); @@ -404,6 +405,7 @@ static uint64_t bitforce_get_result(struct thr_info *thr, struct work *work) applog(LOG_INFO, "BFL%i: Disabling broken nonce range support", bitforce->device_id); bitforce->nonce_range = false; work->blk.nonce = 0xffffffff; + bitforce->sleep_ms *= 5; } submit_nonce(thr, work, nonce);