Browse Source

Break out of idling loop in avalon_idle if the buffer is full.

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

5
driver-avalon.c

@ -465,17 +465,18 @@ static void avalon_idle(struct cgpu_info *avalon, struct avalon_info *info)
info->idle = true; info->idle = true;
wait_avalon_ready(avalon); wait_avalon_ready(avalon);
applog(LOG_WARNING, "AVA%i: Idling %d miners", avalon->device_id,
info->miner_count);
/* Send idle to all miners */ /* Send idle to all miners */
for (i = 0; i < info->miner_count; i++) { for (i = 0; i < info->miner_count; i++) {
struct avalon_task at; struct avalon_task at;
if (unlikely(avalon_buffer_full(avalon)))
break;
avalon_init_task(&at, 0, 0, info->fan_pwm, info->timeout, avalon_init_task(&at, 0, 0, info->fan_pwm, info->timeout,
info->asic_count, info->miner_count, 1, 1, info->asic_count, info->miner_count, 1, 1,
info->frequency); info->frequency);
avalon_send_task(&at, avalon); avalon_send_task(&at, avalon);
} }
applog(LOG_WARNING, "AVA%i: Idling %d miners", avalon->device_id, i);
wait_avalon_ready(avalon); wait_avalon_ready(avalon);
} }

Loading…
Cancel
Save