Browse Source

Merge branch 'master' into avalon-dev

nfactor-troky
Con Kolivas 12 years ago
parent
commit
f6284f7ca5
  1. 27
      driver-avalon.c
  2. 1
      miner.h

27
driver-avalon.c

@ -929,17 +929,22 @@ static int64_t avalon_scanhash(struct thr_info *thr)
elapsed.tv_sec, elapsed.tv_usec); elapsed.tv_sec, elapsed.tv_usec);
} }
} }
if (unlikely(result_wrong >= avalon_get_work_count || if (hash_count) {
(hash_count == 0 && ret != AVA_GETS_RESTART))) { if (avalon->results < AVALON_ARRAY_SIZE)
/* This means FPGA controller gave all wrong results, so avalon->results++;
* try to reset the Avalon */ } else if (unlikely((result_wrong >= avalon_get_work_count ) ||
do_avalon_close(thr); (ret != AVA_GETS_RESTART && --avalon->results < 0))) {
applog(LOG_ERR, /* Look for all invalid results, or consecutive failure
"AVA%i: FPGA controller mess up, %d wrong results", avalon->device_id, result_wrong); * to generate any results suggesting the FPGA
dev_error(avalon, REASON_DEV_COMMS_ERROR); * controller has screwed up. */
sleep(1); do_avalon_close(thr);
avalon_init(avalon); applog(LOG_ERR,
return 0; "AVA%i: FPGA controller messed up, %d wrong results",
avalon->device_id, result_wrong);
dev_error(avalon, REASON_DEV_COMMS_ERROR);
sleep(1);
avalon_init(avalon);
return 0;
} }
avalon_rotate_array(avalon); avalon_rotate_array(avalon);

1
miner.h

@ -431,6 +431,7 @@ struct cgpu_info {
struct work **works; struct work **works;
int work_array; int work_array;
int queued; int queued;
int results;
#endif #endif
#ifdef USE_USBUTILS #ifdef USE_USBUTILS
struct cg_usb_info usbinfo; struct cg_usb_info usbinfo;

Loading…
Cancel
Save