mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Set the fanspeed on bflsc to max if we don't know the temperature.
This commit is contained in:
parent
7be081d81b
commit
e172c987f3
@ -1905,17 +1905,19 @@ static int64_t bflsc_scanwork(struct thr_info *thr)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set the fanspeed to auto for any valid value under 60, or max for any value
|
||||||
|
* above 60 or if we don't know the temperature. */
|
||||||
static void bflsc_set_fanspeed(struct cgpu_info *bflsc)
|
static void bflsc_set_fanspeed(struct cgpu_info *bflsc)
|
||||||
{
|
{
|
||||||
struct bflsc_info *sc_info = (struct bflsc_info *)bflsc->device_data;
|
struct bflsc_info *sc_info = (struct bflsc_info *)bflsc->device_data;
|
||||||
int amount, err;
|
int amount, err;
|
||||||
|
|
||||||
if ((bflsc->temp <= 60 && sc_info->fanauto) ||
|
if ((bflsc->temp <= 60 && bflsc->temp > 0 && sc_info->fanauto) ||
|
||||||
(bflsc->temp > 60 && !sc_info->fanauto))
|
((bflsc->temp > 60 || !bflsc->temp) && !sc_info->fanauto))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mutex_lock(&bflsc->device_mutex);
|
mutex_lock(&bflsc->device_mutex);
|
||||||
if (bflsc->temp > 60) {
|
if (bflsc->temp > 60 || !bflsc->temp) {
|
||||||
write_to_dev(bflsc, 0, BFLSC_FAN4, BFLSC_FAN4_LEN, &amount,
|
write_to_dev(bflsc, 0, BFLSC_FAN4, BFLSC_FAN4_LEN, &amount,
|
||||||
C_SETFAN);
|
C_SETFAN);
|
||||||
sc_info->fanauto = false;
|
sc_info->fanauto = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user