Commit 675030cebd830dfff1cc75871518bc7f0ab9fef1

Con Kolivas 2014-01-25T20:20:56

Put a sanity check on the measured temperature in the hfa driver for obviously wrong values.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-hashfast.c b/driver-hashfast.c
index e28a3eb..860307a 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -1117,7 +1117,9 @@ static void hfa_statline_before(char *buf, size_t bufsiz, struct cgpu_info *hash
 
 		d = &info->die_status[i];
 		temp = GN_DIE_TEMPERATURE(d->die.die_temperature);
-		if (temp > max_temp)
+		/* Sanity check on temp since we change it lockless it can
+		 * rarely read a massive value */
+		if (temp > max_temp && temp < 200)
 			max_temp = temp;
 		for (j = 0; j < 6; j++) {
 			double volt = GN_CORE_VOLTAGE(d->die.core_voltage[j]);