Browse Source

Loop in bitforce scanhash till end nonce reaches full nonce range.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
e10aa2092b
  1. 6
      driver-bitforce.c

6
driver-bitforce.c

@ -420,8 +420,9 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6 @@ -420,8 +420,9 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
struct cgpu_info *bitforce = thr->cgpu;
unsigned int sleep_time;
struct timeval tdiff;
uint64_t ret;
uint64_t ret = 1;
while (bitforce->end_nonce < 0xffffffff) {
bitforce->wait_ms = 0;
ret = bitforce_send_work(thr, work);
@ -457,13 +458,14 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6 @@ -457,13 +458,14 @@ static uint64_t bitforce_scanhash(struct thr_info *thr, struct work *work, uint6
ret = bitforce_get_result(thr, work);
if (!ret) {
ret = 1;
applog(LOG_ERR, "BFL%i: Comms error", bitforce->device_id);
bitforce->device_last_not_well = time(NULL);
bitforce->device_not_well_reason = REASON_DEV_COMMS_ERROR;
bitforce->dev_comms_error_count++;
/* empty read buffer */
biforce_clear_buffer(bitforce);
return 1;
}
}
return ret;
}

Loading…
Cancel
Save