From 8e69d75f36f58adefa32a5b3250c9ec4ddb0202d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 7 Apr 2013 11:59:14 +1000 Subject: [PATCH] Store the subid for the work item in avalon. --- driver-avalon.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index b263d0ad..959b43ee 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -771,15 +771,17 @@ static inline void adjust_fan(struct avalon_info *info) static bool avalon_fill(struct cgpu_info *avalon) { + int subid, mc = avalon_infos[avalon->device_id]->miner_count; struct work *work; - int mc = avalon_infos[avalon->device_id]->miner_count; if (avalon->queued >= mc) return true; work = get_queued(avalon); if (unlikely(!work)) return false; - avalon->works[avalon->work_array * mc + avalon->queued++] = work; + subid = avalon->queued++; + work->subid = subid; + avalon->works[avalon->work_array * mc + subid] = work; if (avalon->queued >= mc) return true; return false;