From fb34cb1784771ad734fa0724b258bcd4e6e5cad9 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 8 Apr 2013 10:34:47 +1000 Subject: [PATCH] Check for AVA_GETS_RESTART when deciding if avalon has messed up. --- driver-avalon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver-avalon.c b/driver-avalon.c index 9435c366..9724dca8 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -811,7 +811,7 @@ static int64_t avalon_scanhash(struct thr_info *thr) { struct cgpu_info *avalon; struct work **works; - int fd, ret, full; + int fd, ret = AVA_GETS_OK, full; struct avalon_info *info; struct avalon_task at; @@ -934,7 +934,7 @@ static int64_t avalon_scanhash(struct thr_info *thr) elapsed.tv_sec, elapsed.tv_usec); } } - if (result_wrong >= info->miner_count) { + if (result_wrong >= info->miner_count && ret != AVA_GETS_RESTART) { /* This mean FPGA controller gave all wrong results, so * try to reset the Avalon */ do_avalon_close(thr);