Browse Source

Merge commit 'c80c65e' into cg_queuedwork

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
b0c1109d9c
2 changed files with 5 additions and 1 deletions
  1. 4 1
      miner.c
  2. 1 0
      miner.h

+ 4 - 1
miner.c

@@ -7037,8 +7037,11 @@ static void hash_queued_work(struct thr_info *mythr)
 			memcpy(&tv_start, &tv_end, sizeof(struct timeval));
 		}
 
-		if (unlikely(mythr->work_restart))
+		if (unlikely(mythr->work_restart)) {
 			flush_queue(cgpu);
+			if (drv->flush_work)
+				drv->flush_work(cgpu);
+		}
 
 		if (unlikely(mythr->pause || cgpu->deven != DEV_ENABLED))
 			mt_disable(mythr);

+ 1 - 0
miner.h

@@ -295,6 +295,7 @@ struct device_drv {
 	int64_t (*scanhash)(struct thr_info *, struct work *, int64_t);
 	int64_t (*scanwork)(struct thr_info *);
 	bool (*queue_full)(struct cgpu_info *);
+	void (*flush_work)(struct cgpu_info *);
 
 	void (*hw_error)(struct thr_info *);
 	void (*thread_shutdown)(struct thr_info *);