Commit faefabf8698b74384a83c16d7234fe07c8462139

Con Kolivas 2014-04-17T14:53:25

Limit bxf sleep in bxf_scan to 100ms minimum for strings of many chips

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/driver-bitfury.c b/driver-bitfury.c
index 975179e..673e1b0 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -1222,11 +1222,14 @@ out:
 
 static int64_t bxf_scan(struct cgpu_info *bitfury, struct bitfury_info *info)
 {
+	int ms, aged;
 	int64_t ret;
-	int aged;
 
 	bxf_update_work(bitfury, info);
-	cgsleep_ms(1200 / info->chips);
+	ms = 1200 / info->chips;
+	if (ms < 100)
+		ms = 100;
+	cgsleep_ms(ms);
 
 	mutex_lock(&info->lock);
 	ret = bitfury_rate(info);