Commit d7c99cd11611310e02fd30b830946c2c9af5358e

Con Kolivas 2013-07-01T10:43:33

Use a more conservative upper limit of 1% for hardware errors with avalon auto frequency.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/driver-avalon.c b/driver-avalon.c
index 677ce33..c3b3aa7 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -889,10 +889,10 @@ static void *avalon_send_tasks(void *userdata)
 			    info->auto_nonces <= (AVALON_AUTO_CYCLE * 21 / 20)) {
 				int total = info->auto_nonces + info->auto_hw;
 
-				/* Try to keep hw errors ~1-1.5% */
-				if (info->auto_hw * 100 < total)
+				/* Try to keep hw errors ~1% */
+				if (info->auto_hw * 200 < total)
 					avalon_inc_freq(info);
-				else if (info->auto_hw * 66 > total)
+				else if (info->auto_hw * 100 > total)
 					avalon_dec_freq(info);
 			}
 			avalon_reset_auto(info);