Browse Source

Merge commit 'd9ba82c' into update_avalon_20130524

Luke Dashjr 12 years ago
parent
commit
14625c73c2
1 changed files with 6 additions and 18 deletions
  1. 6 18
      driver-avalon.c

+ 6 - 18
driver-avalon.c

@@ -716,8 +716,6 @@ static void do_avalon_close(struct thr_info *thr)
 
 static inline void record_temp_fan(struct avalon_info *info, struct avalon_result *ar, float *temp_avg)
 {
-	int max;
-
 	info->fan0 = ar->fan0 * AVALON_FAN_FACTOR;
 	info->fan1 = ar->fan1 * AVALON_FAN_FACTOR;
 	info->fan2 = ar->fan2 * AVALON_FAN_FACTOR;
@@ -740,22 +738,12 @@ static inline void record_temp_fan(struct avalon_info *info, struct avalon_resul
 
 	*temp_avg = info->temp2;
 
-	max = info->temp_max;
-	if (info->temp0 > max)
-		max = info->temp0;
-	if (info->temp1 > max)
-		max = info->temp1;
-	if (info->temp2 > max)
-		max = info->temp2;
-	if (max >= 100) {	/* FIXME: fix the root cause on fpga controller firmware */
-		if (opt_debug) {
-			applog(LOG_DEBUG, "Avalon: temp_max: %d", max);
-			hexdump((uint8_t *)ar, AVALON_READ_SIZE);
-		}
-		return;
-	}
-
-	info->temp_max = max;
+	if (info->temp0 > info->temp_max)
+		info->temp_max = info->temp0;
+	if (info->temp1 > info->temp_max)
+		info->temp_max = info->temp1;
+	if (info->temp2 > info->temp_max)
+		info->temp_max = info->temp2;
 }
 
 static inline void adjust_fan(struct avalon_info *info)