Browse Source

Bugfix: bitforce: Only warn and disable bitforce due to thermal cutoff, if it's actually enabled

Luke Dashjr 13 years ago
parent
commit
e59ccf7d8e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      driver-bitforce.c

+ 5 - 3
driver-bitforce.c

@@ -258,12 +258,14 @@ static bool bitforce_get_temp(struct cgpu_info *bitforce)
 		if (temp > 0) {
 		if (temp > 0) {
 			bitforce->temp = temp;
 			bitforce->temp = temp;
 			if (unlikely(bitforce->cutofftemp > 0 && 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;
+				if (bitforce->deven == DEV_ENABLED) {
+					applog(LOG_WARNING, "BFL%i: Hit thermal cutoff limit, disabling!", bitforce->device_id);
+					bitforce->deven = DEV_RECOVER;
+					++bitforce->dev_thermal_cutoff_count;
+				}
 
 
 				bitforce->device_last_not_well = time(NULL);
 				bitforce->device_last_not_well = time(NULL);
 				bitforce->device_not_well_reason = REASON_DEV_THERMAL_CUTOFF;
 				bitforce->device_not_well_reason = REASON_DEV_THERMAL_CUTOFF;
-				bitforce->dev_thermal_cutoff_count++;
 			}
 			}
 		}
 		}
 	}
 	}