Browse Source

continue on reset work. wait for buffer empty

Xiangfu 13 years ago
parent
commit
4133c43ef2
2 changed files with 4 additions and 6 deletions
  1. 2 4
      driver-avalon.c
  2. 2 2
      driver-avalon.h

+ 2 - 4
driver-avalon.c

@@ -573,10 +573,8 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **bulk_work,
 		full = avalon_buffer_full(fd);
 		applog(LOG_DEBUG, "Avalon: Buffer full: %s",
 		       ((full == AVA_BUFFER_FULL) ? "Yes" : "No"));
-		if (full == AVA_BUFFER_EMPTY) {
-			applog(LOG_DEBUG, "Avalon: Finished bulk task!");
+		if (full == AVA_BUFFER_EMPTY)
 			break;
-		}
 
 		work_i0 = work_i1 = work_i2 = -1;
 		ret = avalon_get_result(fd, &ar, thr, &tv_finish);
@@ -616,7 +614,7 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **bulk_work,
 			avalon_free_work(bulk0);
 			avalon_free_work(bulk1);
 			avalon_free_work(bulk2);
-			return estimate_hashes;
+			continue;
 		}
 		work_i0 = avalon_decode_nonce(bulk0, &ar, &nonce);
 		if (work_i0 < 0)

+ 2 - 2
driver-avalon.h

@@ -55,8 +55,8 @@ struct avalon_info {
 #define AVALON_MINER_THREADS 1
 
 #define AVALON_IO_SPEED 19200 // 115200
-#define AVALON_SEND_WORK_PITCH (40*1000*1000) /*  4ms */
-#define AVALON_RESET_PITCH    (80*1000*1000) /* 80ms */
+#define AVALON_SEND_WORK_PITCH (40*1000*1000) /* 40ms */
+#define AVALON_RESET_PITCH     (80*1000*1000) /* 80ms */
 
 #define AVALON_GET_WORK_COUNT 3 // 24
 #define AVALON_DEFAULT_FAN_PWM 0x98