From 36b556aa6657aee3cb459733fbee1e317c752d77 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 1 Jul 2013 15:15:36 +1000 Subject: [PATCH] Set the avalon idle frequency to lowest if avalon auto is enabled and we have an overheat condition. --- driver-avalon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/driver-avalon.c b/driver-avalon.c index eee6d3a3..f9dec0b6 100644 --- a/driver-avalon.c +++ b/driver-avalon.c @@ -922,10 +922,14 @@ static void *avalon_send_tasks(void *userdata) avalon_create_task(&at, avalon->works[i]); info->auto_queued++; } else { + int idle_freq = info->frequency; + idled++; + if (unlikely(info->overheat && opt_avalon_auto)) + idle_freq = AVALON_MIN_FREQUENCY; avalon_init_task(&at, 0, 0, info->fan_pwm, info->timeout, info->asic_count, - info->miner_count, 1, 1, info->frequency); + info->miner_count, 1, 1, idle_freq); /* Reset the auto_queued count if we end up * idling any miners. */ avalon_reset_auto(info);