kern/61592: [PATCH] Reverse logic for user override in
acpi_thermal.c
Andrew Thompson
andy at fud.org.nz
Mon Jan 19 14:20:23 PST 2004
>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 at 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:
More information about the freebsd-bugs
mailing list