Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Apr 2008 01:37:37 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: initial value of tz_active
Message-ID:  <480FBA31.2050202@icyb.net.ua>
In-Reply-To: <480F921D.3050505@root.org>
References:  <480F8E2E.8000502@icyb.net.ua> <480F921D.3050505@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 23/04/2008 22:46 Nate Lawson said the following:
> Andriy Gapon wrote:
>> It seems that tz_active (in acpi_thermal) is initialized to NONE/-1.
>> I don't have a patch, but I have an idea - acpi_thermal should query
>> current power state of fans and set tz_active based on that.
>> For example, some systems start up with all fans turned on (at full
>> speed) for safety reasons, acpi_thermal sees that temperature is low
>> enough, it thinks/assumes that no fan is active, so it doesn't change AC
>> level, so in reality AC0 is always in effect.
> 
> Good point.  I think there should be a "first_time" static that is set 
> on boot.  Once acpi_thermal decides to turn some fans on or off, 
> first_time is set.  Until it has been set, all fan control is actually 
> performed, regardless of tz_active.  After it is set, we can depend on 
> tz_active as before.
> 
> The reason we can't just read the fan status and initialize tz_active 
> accordingly is that some ASL doesn't return the real value of the fans. 
>   It just returns a hard-coded value.  On many systems, it does return 
> the real value but if even one system is wrong, we can't trust any of them.
> 

I agree - this is a better approach.
On a technical level  - maybe use TZ_ACTIVE_UNKNOWN=-2 instead of a new
variable.
I'll try to work on this somewhere in the middle of May.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?480FBA31.2050202>