Browse Source

Merge commit 'legko/master^^^' into metabank

Conflicts:
	driver-bitfury.c
	libbitfury.c
	libbitfury.h
Luke Dashjr 12 years ago
parent
commit
d92ea30f93
3 changed files with 9 additions and 2 deletions
  1. 5 0
      driver-bitfury.c
  2. 3 2
      libbitfury.c
  3. 1 0
      libbitfury.h

+ 5 - 0
driver-bitfury.c

@@ -192,6 +192,7 @@ int64_t bitfury_scanHash(struct thr_info *thr)
 		int len, k;
 		int len, k;
 		double gh[32][8] = {{0}};
 		double gh[32][8] = {{0}};
 		double ghsum = 0, gh1h = 0, gh2h = 0;
 		double ghsum = 0, gh1h = 0, gh2h = 0;
+		unsigned strange_counter = 0;
 
 
 		for (proc = cgpu; proc; proc = proc->next_proc)
 		for (proc = cgpu; proc; proc = proc->next_proc)
 		{
 		{
@@ -214,9 +215,13 @@ int64_t bitfury_scanHash(struct thr_info *thr)
 			shares_total += shares_found;
 			shares_total += shares_found;
 			shares_first += chip < 4 ? shares_found : 0;
 			shares_first += chip < 4 ? shares_found : 0;
 			shares_last += chip > 3 ? shares_found : 0;
 			shares_last += chip > 3 ? shares_found : 0;
+			strange_counter += bitfury->strange_counter;
+			bitfury->strange_counter = 0;
 		}
 		}
 		sprintf(line, "vvvvwww SHORT stat %ds: wwwvvvv", short_stat);
 		sprintf(line, "vvvvwww SHORT stat %ds: wwwvvvv", short_stat);
 		applog(LOG_WARNING, "%s", line);
 		applog(LOG_WARNING, "%s", line);
+		sprintf(line, "stranges: %u", strange_counter);
+		applog(LOG_WARNING, "%s", line);
 		for(i = 0; i < 32; i++)
 		for(i = 0; i < 32; i++)
 			if(strlen(stat_lines[i])) {
 			if(strlen(stat_lines[i])) {
 				len = strlen(stat_lines[i]);
 				len = strlen(stat_lines[i]);

+ 3 - 2
libbitfury.c

@@ -486,6 +486,7 @@ void libbitfury_sendHashData1(int chip_id, struct bitfury_device *d, struct thr_
 				}
 				}
 				if (!found) {
 				if (!found) {
 					inc_hw_errors2(thr, NULL, &pn);
 					inc_hw_errors2(thr, NULL, &pn);
+					d->strange_counter++;
 				}
 				}
 			}
 			}
 		}
 		}
@@ -529,10 +530,10 @@ void libbitfury_sendHashData1(int chip_id, struct bitfury_device *d, struct thr_
 			mhz = 1.0 / ns * 65.0 * 1000.0;
 			mhz = 1.0 / ns * 65.0 * 1000.0;
 
 
 			if (d->counter1 > 0 && d->counter1 < 0x001FFFFF) {
 			if (d->counter1 > 0 && d->counter1 < 0x001FFFFF) {
-				applog(LOG_DEBUG, "AAA chip_id %2d: %llu ms, req1_cycles: %08u,  counter1: %08d, ocounter1: %08d, counter2: %08d, cycles: %08d, ns: %.2f, mhz: %.2f ", chip_id, period / 1000000ULL, req1_cycles, d->counter1, d->ocounter1, d->counter2, cycles, ns, mhz);
+				//applog(LOG_DEBUG, "//AAA chip_id %2d: %llu ms, req1_cycles: %08u,  counter1: %08d, ocounter1: %08d, counter2: %08d, cycles: %08d, ns: %.2f, mhz: %.2f ", chip_id, period / 1000000ULL, req1_cycles, d->counter1, d->ocounter1, d->counter2, cycles, ns, mhz);
 			}
 			}
 			if (ns > 2000.0 || ns < 20) {
 			if (ns > 2000.0 || ns < 20) {
-				applog(LOG_DEBUG, "AAA %d!Stupid ns chip_id %2d: %llu ms, req1_cycles: %08u,  counter1: %08d, ocounter1: %08d, counter2: %08d, cycles: %08d, ns: %.2f, mhz: %.2f ", ccase, chip_id, period / 1000000ULL, req1_cycles, d->counter1, d->ocounter1, d->counter2, cycles, ns, mhz);
+				//applog(LOG_DEBUG, "AAA %d!Stupid ns chip_id %2d: %llu ms, req1_cycles: %08u,  counter1: %08d, ocounter1: %08d, counter2: %08d, cycles: %08d, ns: %.2f, mhz: %.2f ", ccase, chip_id, period / 1000000ULL, req1_cycles, d->counter1, d->ocounter1, d->counter2, cycles, ns, mhz);
 				ns = 200.0;
 				ns = 200.0;
 			} else {
 			} else {
 				d->ns = ns;
 				d->ns = ns;

+ 1 - 0
libbitfury.h

@@ -50,6 +50,7 @@ struct bitfury_device {
 	double ns;
 	double ns;
 	unsigned slot;
 	unsigned slot;
 	unsigned fasync;
 	unsigned fasync;
+	unsigned strange_counter;
 	bool second_run;
 	bool second_run;
 	
 	
 	time_t short_out_t;
 	time_t short_out_t;