Commit 23fa953bfcdb533d3d239dbd583a8e96d78370ee

Con Kolivas 2013-04-05T18:51:20

Check enough work is queued before queueing more in avalon_fill.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/driver-avalon.c b/driver-avalon.c
index 48bb870..cfa2b7a 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -768,6 +768,8 @@ static bool avalon_fill(struct cgpu_info *avalon)
 
 	if (unlikely(!work))
 		return false;
+	if (avalon->queued == avalon_info[avalon->device_id]->miner_count)
+		return true;
 	avalon->works[avalon->queued++] = work;
 	if (avalon->queued == avalon_info[avalon->device_id]->miner_count)
 		return true;