Browse Source

hashfast: Debuglog work flushing

Luke Dashjr 12 years ago
parent
commit
6958f53084
1 changed files with 7 additions and 1 deletions
  1. 7 1
      driver-hashfast.c

+ 7 - 1
driver-hashfast.c

@@ -373,8 +373,14 @@ void hashfast_queue_flush(struct thr_info * const thr)
 	uint8_t cmd[HASHFAST_HEADER_SIZE];
 	uint8_t cmd[HASHFAST_HEADER_SIZE];
 	uint16_t hdata = 2;
 	uint16_t hdata = 2;
 	if ((!thr->work) || stale_work(thr->work->prev, true))
 	if ((!thr->work) || stale_work(thr->work->prev, true))
-		// Abort current job too
+	{
+		applog(LOG_DEBUG, "%"PRIpreprv": Flushing both active and pending work",
+		       proc->proc_repr);
 		hdata |= 1;
 		hdata |= 1;
+	}
+	else
+		applog(LOG_DEBUG, "%"PRIpreprv": Flushing pending work",
+		       proc->proc_repr);
 	hashfast_send_msg(fd, cmd, HFOP_ABORT, cs->chipaddr, cs->coreaddr, hdata, 0);
 	hashfast_send_msg(fd, cmd, HFOP_ABORT, cs->chipaddr, cs->coreaddr, hdata, 0);
 }
 }