Browse Source

Do not lose the first sets of results from BF1.

nfactor-troky
Con Kolivas 11 years ago
parent
commit
ff4c4779f7
  1. 4
      driver-bitfury.c

4
driver-bitfury.c

@ -179,7 +179,8 @@ static int64_t bitfury_scanhash(struct thr_info *thr, struct work *work,
/* New results may spill out from the latest work, making us drop out /* New results may spill out from the latest work, making us drop out
* too early so read whatever we get for the first half nonce and then * too early so read whatever we get for the first half nonce and then
* look for the results to prev work. */ * look for the results to prev work. */
usb_read_timeout(bitfury, info->buf, 512, &info->tot, 600, C_BFO_GETRES); usb_read_timeout(bitfury, info->buf, 512, &amount, 600, C_BFO_GETRES);
info->tot += amount;
/* Now look for the bulk of the previous work results, they will come /* Now look for the bulk of the previous work results, they will come
* in a batch following the first data. */ * in a batch following the first data. */
@ -217,6 +218,7 @@ static int64_t bitfury_scanhash(struct thr_info *thr, struct work *work,
} }
} }
info->tot = 0;
free_work(info->prevwork2); free_work(info->prevwork2);
cascade: cascade:
info->prevwork2 = info->prevwork1; info->prevwork2 = info->prevwork1;

Loading…
Cancel
Save