Commit 98862b4f46b801e14b9474fdac4286145cbdf6b6

Con Kolivas 2013-06-20T23:59:17

Sleep for less time in wait_avalon_ready till we have a better signalling system from read thread to write.

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-avalon.c b/driver-avalon.c
index 23df70f..66603c5 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -225,12 +225,13 @@ static bool avalon_decode_nonce(struct thr_info *thr, struct cgpu_info *avalon,
 	return submit_nonce(thr, work, nonce);
 }
 
-/* Wait until the ftdi chip returns a CTS saying we can send more data. The
- * status is updated every 40ms. */
+/* Wait until the ftdi chip returns a CTS saying we can send more data. Sleep
+ * for less time than the avalon_read function will wait so we are guaranteed
+ * to go first. */
 static void wait_avalon_ready(struct cgpu_info *avalon)
 {
 	while (avalon_buffer_full(avalon)) {
-		nmsleep(40);
+		nmsleep(16);
 	}
 }