Commit 764f7cc403b7c2c2192e29384d1933a389530a4f

Con Kolivas 2013-05-25T14:38:33

Avoid repeating avalon_idle in do_avalon_close and extra sleep.

diff --git a/driver-avalon.c b/driver-avalon.c
index b7aa4d3..5eb43b2 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -741,7 +741,6 @@ static void do_avalon_close(struct thr_info *thr)
 	struct avalon_info *info = avalon->device_data;
 
 	avalon_free_work(thr);
-	sleep(1);
 	avalon_reset(avalon, avalon->device_fd);
 	avalon_close(avalon->device_fd);
 	avalon->device_fd = -1;
@@ -885,7 +884,6 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 			       avalon->device_id);
 			dev_error(avalon, REASON_DEV_COMMS_ERROR);
 			first_try = 0;
-			sleep(1);
 			avalon_init(avalon);
 			return 0;	/* This should never happen */
 		}
@@ -971,7 +969,6 @@ static int64_t avalon_scanhash(struct thr_info *thr)
 			"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;
 	}