Browse Source

Merge commit '83f4657' into bfgminer

Luke Dashjr 13 years ago
parent
commit
66583e8c6e
1 changed files with 4 additions and 2 deletions
  1. 4 2
      driver-bitforce.c

+ 4 - 2
driver-bitforce.c

@@ -733,8 +733,6 @@ void bitforce_job_get_results(struct thr_info *thr, struct work *work)
 		mutex_unlock(mutexp);
 		mutex_unlock(mutexp);
 
 
 		gettimeofday(&now, NULL);
 		gettimeofday(&now, NULL);
-		if (!count)
-			goto noqr;
 		timersub(&now, &bitforce->work_start_tv, &elapsed);
 		timersub(&now, &bitforce->work_start_tv, &elapsed);
 
 
 		if (elapsed.tv_sec >= BITFORCE_LONG_TIMEOUT_S) {
 		if (elapsed.tv_sec >= BITFORCE_LONG_TIMEOUT_S) {
@@ -743,6 +741,8 @@ void bitforce_job_get_results(struct thr_info *thr, struct work *work)
 			goto out;
 			goto out;
 		}
 		}
 
 
+		if (!count)
+			goto noqr;
 		if (pdevbuf[0] && strncasecmp(pdevbuf, "B", 1)) /* BFL does not respond during throttling */
 		if (pdevbuf[0] && strncasecmp(pdevbuf, "B", 1)) /* BFL does not respond during throttling */
 			break;
 			break;
 
 
@@ -756,6 +756,8 @@ void bitforce_job_get_results(struct thr_info *thr, struct work *work)
 		}
 		}
 
 
 noqr:
 noqr:
+		data->result_busy_polled = bitforce->wait_ms;
+		
 		/* if BFL is throttling, no point checking so quickly */
 		/* if BFL is throttling, no point checking so quickly */
 		delay_time_ms = (pdevbuf[0] ? BITFORCE_CHECK_INTERVAL_MS : 2 * WORK_CHECK_INTERVAL_MS);
 		delay_time_ms = (pdevbuf[0] ? BITFORCE_CHECK_INTERVAL_MS : 2 * WORK_CHECK_INTERVAL_MS);
 		timer_set_delay(&thr->tv_poll, &now, delay_time_ms * 1000);
 		timer_set_delay(&thr->tv_poll, &now, delay_time_ms * 1000);