Browse Source

Don't get any work if our queue is already full in avalon_fill.

nfactor-troky
Con Kolivas 12 years ago
parent
commit
5f041e1a72
  1. 7
      driver-avalon.c

7
driver-avalon.c

@ -785,13 +785,14 @@ static inline void adjust_fan(struct avalon_info *info)
static bool avalon_fill(struct cgpu_info *avalon) static bool avalon_fill(struct cgpu_info *avalon)
{ {
struct work *work = get_queued(avalon); struct work *work;
int mc = avalon_infos[avalon->device_id]->miner_count; int mc = avalon_infos[avalon->device_id]->miner_count;
if (unlikely(!work))
return false;
if (avalon->queued >= mc) if (avalon->queued >= mc)
return true; return true;
work = get_queued(avalon);
if (unlikely(!work))
return false;
avalon->works[avalon->work_array * mc + avalon->queued++] = work; avalon->works[avalon->work_array * mc + avalon->queued++] = work;
if (avalon->queued >= mc) if (avalon->queued >= mc)
return true; return true;

Loading…
Cancel
Save