Browse Source

Merge commit 'ba1ff87' into update_old_avalon_20130513

Luke Dashjr 13 years ago
parent
commit
5eb0656649
1 changed files with 2 additions and 2 deletions
  1. 2 2
      driver-avalon.c

+ 2 - 2
driver-avalon.c

@@ -864,7 +864,7 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **work,
 			avalon_free_work(thr, info->bulk1);
 			avalon_free_work(thr, info->bulk1);
 			avalon_free_work(thr, info->bulk2);
 			avalon_free_work(thr, info->bulk2);
 			avalon_free_work(thr, info->bulk3);
 			avalon_free_work(thr, info->bulk3);
-			continue;
+			break;
 		}
 		}
 		result_count++;
 		result_count++;
 
 
@@ -904,7 +904,7 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **work,
 			       elapsed.tv_sec, elapsed.tv_usec);
 			       elapsed.tv_sec, elapsed.tv_usec);
 		}
 		}
 	}
 	}
-	if (result_count == result_wrong) {
+	if (result_wrong && result_count == result_wrong) {
 		/* This mean FPGA controller give all wrong result
 		/* This mean FPGA controller give all wrong result
 		 * try to reset the Avalon */
 		 * try to reset the Avalon */
 		avalon_free_work(thr, info->bulk0);
 		avalon_free_work(thr, info->bulk0);