Commit 5118e3ee7c06bd0dcdaabdec5df8afd9d80e3956

Con Kolivas 2012-08-03T08:12:05

Check there is a cutoff temp actually set in bitforce before using it as a cut off value otherwise it may think it's set to zero degrees.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-bitforce.c b/driver-bitforce.c
index ebfdb0a..7424b08 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -257,7 +257,7 @@ static bool bitforce_get_temp(struct cgpu_info *bitforce)
 
 		if (temp > 0) {
 			bitforce->temp = temp;
-			if (temp > bitforce->cutofftemp) {
+			if (unlikely(bitforce->cutofftemp > 0 && temp > bitforce->cutofftemp)) {
 				applog(LOG_WARNING, "BFL%i: Hit thermal cutoff limit, disabling!", bitforce->device_id);
 				bitforce->deven = DEV_RECOVER;