Browse Source

Merge branch 'bugfix_titan_20141110' into bfgminer

Luke Dashjr 11 years ago
parent
commit
661b196590
2 changed files with 7 additions and 5 deletions
  1. 5 3
      driver-titan.c
  2. 2 2
      miner.c

+ 5 - 3
driver-titan.c

@@ -219,7 +219,7 @@ static void get_nonce_range(int dieno, int coreno, uint32_t *nonce_bottom, uint3
 	if (!nonce_tops_inited) {
 	if (!nonce_tops_inited) {
 		uint32_t top;
 		uint32_t top;
 		double nonce_f, nonce_step;
 		double nonce_f, nonce_step;
-		int die, core;
+		int core;
 
 
 		nonce_f = 0.0;
 		nonce_f = 0.0;
 		nonce_step = 4294967296.0 / KNC_TITAN_CORES_PER_DIE;
 		nonce_step = 4294967296.0 / KNC_TITAN_CORES_PER_DIE;
@@ -554,6 +554,9 @@ static bool knc_titan_process_report(struct knc_titan_info * const knc, struct k
 	}
 	}
 	knccore->last_nonce.slot = report->nonce[0].slot;
 	knccore->last_nonce.slot = report->nonce[0].slot;
 	knccore->last_nonce.nonce = report->nonce[0].nonce;
 	knccore->last_nonce.nonce = report->nonce[0].nonce;
+	
+	thread_reportin(proc->thr[0]);
+	
 	return ret;
 	return ret;
 }
 }
 
 
@@ -562,7 +565,7 @@ static void knc_titan_poll(struct thr_info * const thr)
 	struct thr_info *mythr;
 	struct thr_info *mythr;
 	struct cgpu_info * const cgpu = thr->cgpu, *proc;
 	struct cgpu_info * const cgpu = thr->cgpu, *proc;
 	struct knc_titan_info * const knc = cgpu->device_data;
 	struct knc_titan_info * const knc = cgpu->device_data;
-	struct knc_titan_core *knccore, *core1;
+	struct knc_titan_core *knccore;
 	struct work *work, *tmp;
 	struct work *work, *tmp;
 	int workaccept = 0;
 	int workaccept = 0;
 	unsigned long delay_usecs = KNC_POLL_INTERVAL_US;
 	unsigned long delay_usecs = KNC_POLL_INTERVAL_US;
@@ -642,7 +645,6 @@ static void knc_titan_poll(struct thr_info * const thr)
 				--knc->workqueue_size;
 				--knc->workqueue_size;
 				DL_DELETE(knc->workqueue, work);
 				DL_DELETE(knc->workqueue, work);
 				work->device_id = MAKE_WORKID(asic, die, die_p->next_slot);
 				work->device_id = MAKE_WORKID(asic, die, die_p->next_slot);
-				struct work *replaced_work;
 				struct work *work1, *tmp1;
 				struct work *work1, *tmp1;
 				HASH_ITER(hh, knc->devicework, work1, tmp1) {
 				HASH_ITER(hh, knc->devicework, work1, tmp1) {
 					if (work->device_id == work1->device_id) {
 					if (work->device_id == work1->device_id) {

+ 2 - 2
miner.c

@@ -11450,7 +11450,7 @@ void drv_set_defaults(const struct device_drv * const drv, const void *datap, vo
 /* Makes sure the hashmeter keeps going even if mining threads stall, updates
 /* Makes sure the hashmeter keeps going even if mining threads stall, updates
  * the screen at regular intervals, and restarts threads if they appear to have
  * the screen at regular intervals, and restarts threads if they appear to have
  * died. */
  * died. */
-#define WATCHDOG_SICK_TIME		300
+#define WATCHDOG_SICK_TIME		60
 #define WATCHDOG_DEAD_TIME		600
 #define WATCHDOG_DEAD_TIME		600
 #define WATCHDOG_SICK_COUNT		(WATCHDOG_SICK_TIME/WATCHDOG_INTERVAL)
 #define WATCHDOG_SICK_COUNT		(WATCHDOG_SICK_TIME/WATCHDOG_INTERVAL)
 #define WATCHDOG_DEAD_COUNT		(WATCHDOG_DEAD_TIME/WATCHDOG_INTERVAL)
 #define WATCHDOG_DEAD_COUNT		(WATCHDOG_DEAD_TIME/WATCHDOG_INTERVAL)
@@ -11629,7 +11629,7 @@ void bfg_watchdog(struct cgpu_info * const cgpu, struct timeval * const tvp_now)
 			} else if (cgpu->status == LIFE_WELL && (tvp_now->tv_sec - thr->last.tv_sec > WATCHDOG_SICK_TIME)) {
 			} else if (cgpu->status == LIFE_WELL && (tvp_now->tv_sec - thr->last.tv_sec > WATCHDOG_SICK_TIME)) {
 				thr->rolling = cgpu->rolling = 0;
 				thr->rolling = cgpu->rolling = 0;
 				cgpu->status = LIFE_SICK;
 				cgpu->status = LIFE_SICK;
-				applog(LOG_ERR, "%s: Idle for more than %d seconds, declaring SICK!", dev_str, WATCHDOG_SICK_TIME);
+				applog(LOG_ERR, "%s: Idle for more than 60 seconds, declaring SICK!", dev_str);
 				cgtime(&thr->sick);
 				cgtime(&thr->sick);
 
 
 				dev_error(cgpu, REASON_DEV_SICK_IDLE_60);
 				dev_error(cgpu, REASON_DEV_SICK_IDLE_60);