Browse Source

bitfury: Send a work with lots of nonces to help cold-started bitfurys fill a static buffer

Luke Dashjr 12 years ago
parent
commit
0daee59729
4 changed files with 20 additions and 4 deletions
  1. 2 2
      driver-bfsb.c
  2. 16 1
      driver-bitfury.c
  3. 1 0
      driver-bitfury.h
  4. 1 1
      driver-metabank.c

+ 2 - 2
driver-bfsb.c

@@ -152,7 +152,7 @@ bool bfsb_init(struct thr_info *thr)
 		bitfury = devicelist[proc->proc_id];
 		proc->device_data = bitfury;
 		bitfury->spi->cgpu = proc;
-		bitfury_init_oldbuf(proc);
+		bitfury_init_chip(proc);
 		bitfury->osc6_bits = 54;
 		send_reinit(bitfury->spi, bitfury->slot, bitfury->fasync, bitfury->osc6_bits);
 	}
@@ -181,7 +181,7 @@ void bfsb_enable(struct thr_info * const thr)
 	
 	applog(LOG_DEBUG, "%"PRIpreprv": Reinitialising chip (enable)", proc->proc_repr);
 	send_reinit(bitfury->spi, bitfury->slot, bitfury->fasync, bitfury->osc6_bits);
-	bitfury_init_oldbuf(proc);
+	bitfury_init_chip(proc);
 }
 
 extern void bitfury_shutdown(struct thr_info *);

+ 16 - 1
driver-bitfury.c

@@ -105,6 +105,7 @@ void bitfury_debug_nonce_array(const struct cgpu_info * const proc, const char *
 	       proc->proc_repr, msg, s, (unsigned long)inp[0x10]);
 }
 
+static
 bool bitfury_init_oldbuf(struct cgpu_info * const proc)
 {
 	struct bitfury_device * const bitfury = proc->device_data;
@@ -160,6 +161,20 @@ tryagain:
 	return true;
 }
 
+bool bitfury_init_chip(struct cgpu_info * const proc)
+{
+	struct bitfury_device * const bitfury = proc->device_data;
+	struct bitfury_payload payload = {
+		.midstate = "\xf9\x9a\xf0\xd5\x72\x34\x41\xdc\x9e\x10\xd1\x1f\xeb\xcd\xe3\xf5"
+		            "\x52\xf1\x14\x63\x06\x14\xd1\x12\x15\x25\x39\xd1\x7d\x77\x5a\xfd",
+		.m7    = 0xafbd0b42,
+		.ntime = 0xb6c24563,
+		.nbits = 0x6dfa4352,
+	};
+	payload_to_atrvec(bitfury->atrvec, &payload);
+	return bitfury_init_oldbuf(proc);
+}
+
 static
 bool bitfury_init(struct thr_info *thr)
 {
@@ -173,7 +188,7 @@ bool bitfury_init(struct thr_info *thr)
 			.spi = sys_spi,
 			.fasync = proc->proc_id,
 		};
-		bitfury_init_oldbuf(proc);
+		bitfury_init_chip(proc);
 	}
 	
 	return true;

+ 1 - 0
driver-bitfury.h

@@ -8,6 +8,7 @@
 
 extern bool bitfury_prepare(struct thr_info *);
 extern bool bitfury_init_oldbuf(struct cgpu_info *);
+extern bool bitfury_init_chip(struct cgpu_info *);
 
 extern int64_t bitfury_scanHash(struct thr_info *);
 

+ 1 - 1
driver-metabank.c

@@ -156,7 +156,7 @@ bool metabank_init(struct thr_info *thr)
 		bitfury = devicelist[proc->proc_id];
 		proc->device_data = bitfury;
 		bitfury->spi->cgpu = proc;
-		bitfury_init_oldbuf(proc);
+		bitfury_init_chip(proc);
 		bitfury->osc6_bits = 54;
 		send_reinit(bitfury->spi, bitfury->slot, bitfury->fasync, bitfury->osc6_bits);