Browse Source

Merge branch 'bitfury' into bfgminer

Luke Dashjr 12 years ago
parent
commit
a4f328417d
2 changed files with 1 additions and 58 deletions
  1. 1 1
      driver-bitfury.c
  2. 0 57
      driver-littlefury.c

+ 1 - 1
driver-bitfury.c

@@ -698,7 +698,7 @@ bool _bitfury_set_device_parse_setting(uint32_t * const rv, char * const setting
 		return false;
 	}
 	nv = strtol(setting, &p, 0);
-	if ((p && p[0]) || nv > maxval || nv < 1)
+	if (nv > maxval || nv < 1)
 	{
 		sprintf(replybuf, "invalid setting");
 		return false;

+ 0 - 57
driver-littlefury.c

@@ -364,56 +364,6 @@ bool littlefury_thread_init(struct thr_info *thr)
 	return true;
 }
 
-static
-bool littlefury_do_io(struct thr_info *thr)
-{
-	struct cgpu_info * const proc = thr->cgpu;
-	struct bitfury_device * const bitfury = proc->device_data;
-	bitfury->results_n = 0;
-	libbitfury_sendHashData1(proc->proc_id, bitfury, thr);
-	if (bitfury->job_switched && thr->next_work)
-	{
-		mt_job_transition(thr);
-		// TODO: Delay morework until right before it's needed
-		timer_set_now(&thr->tv_morework);
-		job_start_complete(thr);
-	}
-	if (thr->work && bitfury->results_n)
-		for (int i = bitfury->results_n; i--; )
-			submit_nonce(thr, thr->work, be32toh(bitfury->results[i]));
-	timer_set_delay_from_now(&thr->tv_poll, 10000);
-	return true;
-}
-
-static
-void littlefury_poll(struct thr_info *thr)
-{
-	littlefury_do_io(thr);
-}
-
-static
-bool littlefury_job_prepare(struct thr_info *thr, struct work *work, __maybe_unused uint64_t max_nonce)
-{
-	struct bitfury_device * const bitfury = thr->cgpu->device_data;
-	work_to_payload(&bitfury->payload, thr->next_work);
-	payload_to_atrvec(bitfury->atrvec, &bitfury->payload);
-	return true;
-}
-
-static
-void littlefury_job_start(struct thr_info *thr)
-{
-	littlefury_do_io(thr);
-}
-
-static
-int64_t littlefury_job_process_results(struct thr_info *thr, struct work *work, bool stopping)
-{
-	if (unlikely(stopping))
-		timer_unset(&thr->tv_poll);
-	return 0x100000000;
-}
-
 static void littlefury_shutdown(struct thr_info *thr)
 {
 	struct cgpu_info * const cgpu = thr->cgpu;
@@ -431,13 +381,6 @@ struct device_drv littlefury_drv = {
 	.name = "LFY",
 	.drv_detect = littlefury_detect,
 	
-	.minerloop = minerloop_async,
-	.thread_init = littlefury_thread_init,
-	.job_prepare = littlefury_job_prepare,
-	.job_start = littlefury_job_start,
-	.poll = littlefury_poll,
-	.job_process_results = littlefury_job_process_results,
-	
 	.minerloop = hash_queued_work,
 	.thread_init = littlefury_thread_init,
 	.scanwork = bitfury_scanHash,