Commit 55cd36c1c4322917060f935f702e28bd3ae3eb24

Con Kolivas 2014-02-23T14:06:44

Limit the decrease of hfa clock rate on reset to the default clockrate.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-hashfast.c b/driver-hashfast.c
index 399f022..fad5275 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1321,6 +1321,8 @@ static int64_t hfa_scanwork(struct thr_info *thr)
 		       hashfast->drv->name, hashfast->device_id, fail_time);
 		if (info->hash_clock_rate > HFA_CLOCK_DEFAULT) {
 			info->hash_clock_rate -= 10;
+			if (info->hash_clock_rate < HFA_CLOCK_DEFAULT)
+				info->hash_clock_rate = HFA_CLOCK_DEFAULT;
 			if (info->hash_clock_rate < opt_hfa_hash_clock)
 				opt_hfa_hash_clock = info->hash_clock_rate;
 			applog(LOG_WARNING, "%s %d: Decreasing clock speed to %d with reset",