Commit 4d1ebc3e7eb147e6aae952731786225fcb2f5189

Kano 2014-03-22T17:20:43

ants1 - stop results read hard looping

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/driver-bitmain.c b/driver-bitmain.c
index 20d3598..6ea9930 100644
--- a/driver-bitmain.c
+++ b/driver-bitmain.c
@@ -1109,13 +1109,8 @@ static void *bitmain_get_results(void *userdata)
 			offset = 0;
 		}
 
-		/* As the usb read returns after just 1ms, sleep long enough
-		 * to leave the interface idle for writes to occur, but do not
-		 * sleep if we have been receiving data as more may be coming. */
-		//if (offset == 0)
-		//	cgsleep_ms_r(&ts_start, BITMAIN_READ_TIMEOUT);
-
-		//cgsleep_prepare_r(&ts_start);
+		// 2ms shouldn't be too much
+		cgsleep_ms(2);
 
 		applog(LOG_DEBUG, "%s%d: %s() read",
 				  bitmain->drv->name, bitmain->device_id, __func__);