Browse Source

Merge commit 'cad1b47' into bfgminer

Luke Dashjr 11 years ago
parent
commit
3fed818134
5 changed files with 10 additions and 12 deletions
  1. 1 1
      README.ASIC
  2. 5 7
      driver-titan.c
  3. 1 1
      knc-asic
  4. 2 2
      titan-asic.c
  5. 1 1
      titan-asic.h

+ 1 - 1
README.ASIC

@@ -232,7 +232,7 @@ Build instructions:
 git clone git@github.com:KnCMiner/bfgminer.git
 cd bfgminer
 ./autogen.sh
-./configure --enable-scrypt --enable-titan --disable-other-drivers
+./configure --enable-scrypt --disable-sha256d --enable-titan --disable-other-drivers
 make
 sudo /etc/init.d/bfgminer.sh restart
 screen -r

+ 5 - 7
driver-titan.c

@@ -203,7 +203,7 @@ static bool knc_titan_detect_one(const char *devpath)
 	for (die = 0; die < KNC_TITAN_DIES_PER_ASIC; ++die) {
 		die_info.cores = KNC_TITAN_CORES_PER_DIE; /* core hint */
 		die_info.version = KNC_VERSION_TITAN;
-		if (!knc_titan_get_info(repr, ctx, asic, die, &die_info))
+		if (!knc_titan_get_info(LOG_NOTICE, ctx, asic, die, &die_info))
 			die_info.cores = -1;
 		if (0 < die_info.cores) {
 			knc->dies[asic][die] = (struct knc_titan_die) {
@@ -459,13 +459,11 @@ static bool knc_titan_init(struct thr_info * const thr)
 static bool die_test_and_add(struct knc_titan_info * const knc, int asic, int die, char * const errbuf)
 {
 	struct knc_die_info die_info;
-	char repr[6];
 	struct knc_titan_die *die_p = &(knc->dies[asic][die]);
 
-	snprintf(repr, sizeof(repr), "%s %d", knc_titan_drv.name, asic);
 	die_info.cores = KNC_TITAN_CORES_PER_DIE; /* core hint */
 	die_info.version = KNC_VERSION_TITAN;
-	if (!knc_titan_get_info(repr, knc->ctx, asic, die, &die_info))
+	if (!knc_titan_get_info(LOG_INFO, knc->ctx, asic, die, &die_info))
 		die_info.cores = -1;
 	if (0 < die_info.cores) {
 		die_p->add_request = 0;
@@ -715,7 +713,7 @@ static void knc_titan_poll(struct thr_info * const thr)
 						if (num_request_busy == 0) {
 							timer_set_now(&tv_now);
 							double diff = ((tv_now.tv_sec - knc->tv_prev.tv_sec) * 1000000.0 + (tv_now.tv_usec - knc->tv_prev.tv_usec)) / 1000000.0;
-							applog(LOG_INFO, "%s: Flush took %f secs for ASIC %d", knc_titan_drv.dname, diff, asic);
+							applog(LOG_DEBUG, "%s: Flush took %f secs for ASIC %d", knc_titan_drv.dname, diff, asic);
 							applog(LOG_DEBUG, "FPGA CRC error counters: %d %d %d %d", num_status_byte_error[0], num_status_byte_error[1], num_status_byte_error[2], num_status_byte_error[3]);
 							knc->asic_served_by_fpga[asic] = false;
 
@@ -734,7 +732,7 @@ static void knc_titan_poll(struct thr_info * const thr)
 					break;
 				bool was_flushed = false;
 				if (die_p->need_flush || need_replace) {
-					applog(LOG_NOTICE, "%s[%d-%d] Flushing stale works (%s)", die_proc->dev_repr, asic, die,
+					applog(LOG_DEBUG, "%s[%d-%d] Flushing stale works (%s)", die_proc->dev_repr, asic, die,
 					       die_p->need_flush ? "New work" : "Slot collision");
 					die_p->need_flush = false;
 					die_p->first_slot = die_p->next_slot;
@@ -774,7 +772,7 @@ static void knc_titan_poll(struct thr_info * const thr)
 				continue;
 			die_info.cores = die_p->cores; /* core hint */
 			die_info.version = KNC_VERSION_TITAN;
-			if (knc->asic_served_by_fpga[asic] || !knc_titan_get_info(cgpu->dev_repr, knc->ctx, asic, die, &die_info))
+			if (knc->asic_served_by_fpga[asic] || !knc_titan_get_info(LOG_DEBUG, knc->ctx, asic, die, &die_info))
 				continue;
 			thread_reportin(die_p->proc->thr[0]);
 

+ 1 - 1
knc-asic

@@ -1 +1 @@
-Subproject commit 7b26a875349bb79fc2311d606ed4ae6338ab9b83
+Subproject commit e75c9ba362466546a83f1e705b62510a0e0afc6c

+ 2 - 2
titan-asic.c

@@ -13,10 +13,10 @@
 
 #include "titan-asic.h"
 
-bool knc_titan_get_info(const char *repr, void * const ctx, int channel, int die, struct knc_die_info *die_info)
+bool knc_titan_get_info(int log_level, void * const ctx, int channel, int die, struct knc_die_info *die_info)
 {
 	int rc;
-	rc = knc_detect_die(ctx, channel, die, die_info);
+	rc = knc_detect_die_(log_level, ctx, channel, die, die_info);
 	return (0 == rc);
 }
 

+ 1 - 1
titan-asic.h

@@ -32,7 +32,7 @@ struct nonce_report {
 	uint8_t slot;
 };
 
-bool knc_titan_get_info(const char *repr, void * const ctx, int channel, int die, struct knc_die_info *die_info);
+bool knc_titan_get_info(int log_level, void * const ctx, int channel, int die, struct knc_die_info *die_info);
 bool knc_titan_set_work(const char *repr, void * const ctx, int channel, int die, int core, int slot, struct work *work, bool urgent, bool *work_accepted, struct knc_report *report);
 bool knc_titan_set_work_multi(const char *repr, void * const ctx, int channel, int die, int core_start, int slot, struct work *work, bool urgent, bool *work_accepted, struct knc_report *reports, int num);
 bool knc_titan_get_report(const char *repr, void * const ctx, int channel, int die, int core, struct knc_report *report);