Browse Source

Demote some Bitfury debug log messages to only with device protocol dumping

Luke Dashjr 11 years ago
parent
commit
77b8ce9e56
2 changed files with 4 additions and 3 deletions
  1. 2 2
      driver-bitfury.c
  2. 2 1
      mcp2210.c

+ 2 - 2
driver-bitfury.c

@@ -167,7 +167,7 @@ tryagain:
 	bitfury->oldjob = inp[0x10];
 	bitfury->desync_counter = 0;
 	
-	if (opt_debug)
+	if (opt_dev_protocol)
 		bitfury_debug_nonce_array(proc, "Init", inp);
 	
 	return true;
@@ -446,7 +446,7 @@ void bitfury_do_io(struct thr_info * const master_thr)
 			goto out;
 		}
 		
-		if (opt_debug)
+		if (opt_dev_protocol)
 			bitfury_debug_nonce_array(proc, "Read", inp);
 		
 		// To avoid dealing with wrap-around entirely, we rotate array so previous active uint32_t is at index 0

+ 2 - 1
mcp2210.c

@@ -221,7 +221,8 @@ bool mcp2210_spi_transfer(struct mcp2210_device * const h, const void * const tx
 				cmd[2] = 0;
 				break;
 			case 0xf8:  // transfer in progress
-				applog(LOG_DEBUG, "%s: SPI transfer rejected temporarily (%d bytes remaining)", __func__, sz);
+				if (opt_dev_protocol)
+					applog(LOG_DEBUG, "%s: SPI transfer rejected temporarily (%d bytes remaining)", __func__, sz);
 				cgsleep_ms(20);
 				goto retry;
 			default: