Commit 18422fbf7dfcc92358b6438d261e7fd2d9fa6a15

Con Kolivas 2013-07-02T16:07:32

Only throttle avalon clockspeed in avalon_auto in non optimal temperature settings if the fanspeed has reached maximum.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/driver-avalon.c b/driver-avalon.c
index 227072d..398920d 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -909,9 +909,12 @@ static void *avalon_send_tasks(void *userdata)
 		if (opt_avalon_auto && info->auto_queued >= AVALON_AUTO_CYCLE) {
 			mutex_lock(&info->lock);
 			if (!info->optimal) {
-				applog(LOG_WARNING, "AVA%i: Above optimal temperature, throttling",
-				       avalon->device_id);
-				avalon_dec_freq(info);
+				if (info->fan_pwm >= opt_avalon_fan_max) {
+					applog(LOG_WARNING,
+					       "AVA%i: Above optimal temperature, throttling",
+					       avalon->device_id);
+					avalon_dec_freq(info);
+				}
 			} else if (info->auto_nonces >= (AVALON_AUTO_CYCLE * 19 / 20) &&
 				   info->auto_nonces <= (AVALON_AUTO_CYCLE * 21 / 20)) {
 					int total = info->auto_nonces + info->auto_hw;