Browse Source

Merge commit '6172bb6' into littlefury

Conflicts:
	driver-bitfury.c
	libbitfury.c
Luke Dashjr 12 years ago
parent
commit
64be1e3ec3
3 changed files with 6 additions and 16 deletions
  1. 6 1
      driver-bitfury.c
  2. 0 14
      libbitfury.c
  3. 0 1
      libbitfury.h

+ 6 - 1
driver-bitfury.c

@@ -169,6 +169,7 @@ static int64_t bitfury_scanHash(struct thr_info *thr)
 	int long_stat = 1800;
 	static time_t long_out_t;
 	static int first = 0; //TODO Move to detect()
+	static bool second_run = false;
 	int i;
 
 	devices = thr->cgpu->devices;
@@ -194,9 +195,11 @@ static int64_t bitfury_scanHash(struct thr_info *thr)
 			}
 			work_to_payload(&(devices[chip].payload), devices[chip].work);
 		}
+		
+		payload_to_atrvec(devices[chip].atrvec, &devices[chip].payload);
+		libbitfury_sendHashData1(chip, &devices[chip], second_run);
 	}
 
-	libbitfury_sendHashData(devices, chip_n);
 	cgsleep_ms(5);
 
 	cgtime(&now);
@@ -326,6 +329,8 @@ static int64_t bitfury_scanHash(struct thr_info *thr)
 		long_out_t = now.tv_sec;
 	}
 
+	second_run = true;
+	
 	return hashes;
 }
 

+ 0 - 14
libbitfury.c

@@ -602,20 +602,6 @@ void libbitfury_sendHashData1(int chip_id, struct bitfury_device *d, bool second
 	}
 }
 
-void libbitfury_sendHashData(struct bitfury_device *bf, int chip_n) {
-	int chip_id;
-	static bool second_run = false;
-
-	for (chip_id = 0; chip_id < chip_n; chip_id++) {
-		struct bitfury_device *d = bf + chip_id;
-		payload_to_atrvec(d->atrvec, &d->payload);
-		libbitfury_sendHashData1(chip_id, d, second_run);
-	}
-	second_run = true;
-
-	return;
-}
-
 int libbitfury_readHashData(unsigned int *res) {
 	return 0;
 }

+ 0 - 1
libbitfury.h

@@ -54,7 +54,6 @@ struct bitfury_device {
 
 int libbitfury_readHashData(unsigned int *res);
 extern void libbitfury_sendHashData1(int chip_id, struct bitfury_device *d, bool second_run);
-void libbitfury_sendHashData(struct bitfury_device *bf, int chip_n);
 void work_to_payload(struct bitfury_payload *p, struct work *w);
 extern void payload_to_atrvec(uint32_t *atrvec, struct bitfury_payload *);
 struct timespec t_diff(struct timespec start, struct timespec end);