From 23fa953bfcdb533d3d239dbd583a8e96d78370ee Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 5 Apr 2013 18:51:20 +1100 Subject: [PATCH] Check enough work is queued before queueing more in avalon_fill. --- driver-avalon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver-avalon.c b/driver-avalon.c index 48bb870f..cfa2b7a2 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;