Use a simple serialised work model for nanofury
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/driver-bitfury.c b/driver-bitfury.c
index b98c641..5090126 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -906,12 +906,11 @@ static int64_t nf1_scan(struct thr_info *thr, struct cgpu_info *bitfury,
struct bitfury_info *info)
{
int64_t ret = 0;
- int aged;
if (!info->work) {
- info->work = get_queue_work(thr, bitfury, thr->id);
+ info->work = get_work(thr, thr->id);
if (unlikely(thr->work_restart)) {
- work_completed(bitfury, info->work);
+ free_work(info->work);
return 0;
}
bitfury_work_to_payload(&info->payload, info->work);
@@ -920,16 +919,12 @@ static int64_t nf1_scan(struct thr_info *thr, struct cgpu_info *bitfury,
return -1;
if (info->job_switched) {
+ if (likely(info->owork))
+ free_work(info->owork);
info->owork = info->work;
info->work = NULL;
}
- aged = age_queued_work(bitfury, 6.0);
- if (aged) {
- applog(LOG_DEBUG, "%s %d: Aged %d work items", bitfury->drv->name,
- bitfury->device_id, aged);
- }
-
ret = bitfury_rate(info);
if (unlikely(bitfury->usbinfo.nodev)) {