Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jan 2004 11:19:40 +1300 (NZDT)
From:      Andrew Thompson <andy@fud.org.nz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        njl@FreeBSD.org
Subject:   kern/61592: [PATCH] Reverse logic for user override in acpi_thermal.c
Message-ID:  <20040119221940.D2410170A9@smtp.fud.org.nz>
Resent-Message-ID: <200401192220.i0JMK8Jr095593@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         61592
>Category:       kern
>Synopsis:       [PATCH] Reverse logic for user override in acpi_thermal.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 19 14:20:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Thompson
>Release:        FreeBSD 5.2-RC i386
>Organization:
>Environment:
System: FreeBSD kate.fud.org.nz 5.2-RC FreeBSD 5.2-RC #0: Sat Dec 13 00:52:30 NZDT 2003 andy@kate.fud.org.nz:/usr/obj/usr/src/sys/KATE i386


	
>Description:
A user can set tz_requested via the tzX.active sysctl. The thermal states sort 
from hot to cold where 0 has the most cooling power. (AFAIK :)

The current logic means that if a user sets it to a lower cooling (e.g 3) it 
will not go to 2,1 or 0 (more cooling). Essentially limiting the cooling.

I believe it should be the other way around, where tz_requested sets the
minimum cooling level, not maximum. patch attached.

>How-To-Repeat:
>Fix:


--- sys/dev/acpica/acpi_thermal.c.orig  Tue Jan 20 11:07:24 2004
+++ sys/dev/acpica/acpi_thermal.c       Tue Jan 20 11:06:42 2004
@@ -436,7 +436,7 @@
     }
 
     /* Handle user override of active mode */
-    if (sc->tz_requested > newactive)
+    if (sc->tz_requested != TZ_ACTIVE_NONE && sc->tz_requested < newactive)
        newactive = sc->tz_requested;
 
     /* update temperature-related flags */

>Release-Note:
>Audit-Trail:
>Unformatted:



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