mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-09 12:11:02 +00:00
Fix record_temp_fan function in avalon driver. Patch by Xiangfu <xiangfu@openmobilefree.net>
This commit is contained in:
parent
8b2b9b3d3e
commit
d9ba82c607
@ -721,8 +721,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;
|
||||
@ -745,22 +743,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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user