Browse Source

print out fan/temp info

Xiangfu 13 years ago
parent
commit
aa1beb3a35
2 changed files with 10 additions and 4 deletions
  1. 10 1
      driver-avalon.c
  2. 0 3
      driver-avalon.h

+ 10 - 1
driver-avalon.c

@@ -138,6 +138,7 @@ static int avalon_send_task(int fd, const struct avalon_task *at)
 	if (unlikely(ret != nr_len))
 	if (unlikely(ret != nr_len))
 		return AVA_SEND_ERROR;
 		return AVA_SEND_ERROR;
 
 
+
 	p.tv_sec = 0;
 	p.tv_sec = 0;
 	p.tv_nsec = AVALON_SEND_WORK_PITCH;
 	p.tv_nsec = AVALON_SEND_WORK_PITCH;
 	nanosleep(&p, NULL);
 	nanosleep(&p, NULL);
@@ -206,7 +207,7 @@ static int avalon_get_result(int fd, struct avalon_result *ar,
 	struct cgpu_info *avalon;
 	struct cgpu_info *avalon;
 	struct avalon_info *info;
 	struct avalon_info *info;
 	uint8_t result[AVALON_READ_SIZE];
 	uint8_t result[AVALON_READ_SIZE];
-	int ret, read_count = 16;
+	int ret, read_count = AVALON_RESET_FAULT_DECISECONDS * TIME_FACTOR;
 
 
 	if (thr) {
 	if (thr) {
 		avalon = thr->cgpu;
 		avalon = thr->cgpu;
@@ -293,6 +294,10 @@ static int avalon_reset(int fd, uint8_t timeout_p, uint8_t asic_num_p, uint8_t m
 	p.tv_nsec = AVALON_RESET_PITCH;
 	p.tv_nsec = AVALON_RESET_PITCH;
 	nanosleep(&p, NULL);
 	nanosleep(&p, NULL);
 
 
+	applog(LOG_ERR,
+	       "Avalon: Fan1: %d, Fan2: %d, Fan3: %d. Temp1: %d, Temp2: %d, Temp3: %d",
+	       ar.fan0, ar.fan1, ar.fan2, ar.temp0, ar.temp1, ar.temp2);
+
 	applog(LOG_ERR, "Avalon: Reset succeeded");
 	applog(LOG_ERR, "Avalon: Reset succeeded");
 	return 0;
 	return 0;
 }
 }
@@ -710,6 +715,10 @@ static int64_t avalon_scanhash(struct thr_info *thr, struct work **bulk_work,
 		       nonce, hash_count, elapsed.tv_sec, elapsed.tv_usec);
 		       nonce, hash_count, elapsed.tv_sec, elapsed.tv_usec);
 	}
 	}
 
 
+	applog(LOG_ERR,
+	       "Avalon: Fan1: %d, Fan2: %d, Fan3: %d. Temp1: %d, Temp2: %d, Temp3: %d",
+	       ar.fan0, ar.fan1, ar.fan2, ar.temp0, ar.temp1, ar.temp2);
+
 	return hash_count;
 	return hash_count;
 }
 }
 
 

+ 0 - 3
driver-avalon.h

@@ -62,10 +62,7 @@ struct avalon_info {
 
 
 #define TIME_FACTOR 10
 #define TIME_FACTOR 10
 #define AVALON_RESET_FAULT_DECISECONDS 1
 #define AVALON_RESET_FAULT_DECISECONDS 1
-#define AVALON_READ_COUNT_TIMING	(5 * TIME_FACTOR)
 #define AVALON_HASH_TIME (0.0000000026316 / 3)
 #define AVALON_HASH_TIME (0.0000000026316 / 3)
-#define NANOSEC 1000000000.0
-
 
 
 #define AVALON_MINER_THREADS 1
 #define AVALON_MINER_THREADS 1