All of lore.kernel.org
 help / color / mirror / Atom feed
* regression / [PATCH] ACPI: fix fan/thermal resume
@ 2006-07-05 20:09 Daniel Ritz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Ritz @ 2006-07-05 20:09 UTC (permalink / raw)
  To: Konstantin Karasyov, Len Brown
  Cc: Sanjoy Mahajan, Pavel Machek, linux-kernel, Linus Torvalds,
	Andrew Morton

hi

found another smallish but annoying regression...description/patch below.
@intel: please add signed-off-by lines and forward to Linus before 2.6.18 if you argee.
@akpm: one round or so in -mm?

thanks, rgds
-daniel

----------------

[PATCH] ACPI fix fan/thermal resume

the acpi driver suspend/resume patches that went in recently caused a regression
on my box (toshiba tecra 8000 laptop): after resume from swsusp the fan turns on
keeping blowing cold air out of my notebook. before the patches, the fan was off
and would only make noise when required. it's the same thing described in
bugzilla.kernel.org #5000. the acpi suspend/resume patches or at least parts of
them originate in this bug. now the last patch in the report (attach id 8438)
actually fixes the problem - for me and the reporter. this is a trimmed down
version of that patch.

From: Konstantin Karasyov <konstantin.a.karasyov@intel.com>
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Len Brown <len.brown@intel.com>
Cc: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Cc: Pavel Machek <pavel@suse.cz>

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 503c0b9..fdba487 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1359,13 +1359,28 @@ static int acpi_thermal_remove(struct ac
 static int acpi_thermal_resume(struct acpi_device *device, int state)
 {
 	struct acpi_thermal *tz = NULL;
+	int i;
 
 	if (!device || !acpi_driver_data(device))
 		return -EINVAL;
 
 	tz = (struct acpi_thermal *)acpi_driver_data(device);
 
-	acpi_thermal_check(tz);
+	acpi_thermal_get_temperature(tz);
+
+	for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) {
+		if (tz->trips.active[i].flags.valid) {
+ 			tz->temperature = tz->trips.active[i].temperature;
+			tz->trips.active[i].flags.enabled = 0;
+
+			acpi_thermal_active(tz);
+
+			tz->state.active |= tz->trips.active[i].flags.enabled;
+			tz->state.active_index = i;
+		}
+	}
+
+ 	acpi_thermal_check(tz);
 
 	return AE_OK;
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: regression / [PATCH] ACPI: fix fan/thermal resume
@ 2006-07-05 23:22 Brown, Len
  0 siblings, 0 replies; 2+ messages in thread
From: Brown, Len @ 2006-07-05 23:22 UTC (permalink / raw)
  To: Daniel Ritz, Karasyov, Konstantin A
  Cc: Sanjoy Mahajan, Pavel Machek, linux-kernel, Linus Torvalds,
	Andrew Morton

>found another smallish but annoying 
>regression...description/patch below.
>@intel: please add signed-off-by lines and forward to Linus 
>before 2.6.18 if you argee.
>@akpm: one round or so in -mm?

Daniel,

If the patch that originated in bugzilla 5000 fixes
your system, it would be most helpful if you could
update that bug report with your test results.

If you tested a modified patch, then it would be best
to attach that path to the report so that others could
test your modification also.

We use the RESOLVED state to signify that a patch exists
in the bug report that may fix the issue and it needs
review, testing, and consideration for forwarding to mm
and untimately to linus, depending on the results.

Looks like # 5000 moved from RESOLVED back to ASSIGNED
when the resume regression was found.
It should be marked RESOLVED now that there is a follow-on
patch to address that regression.

thanks,
-Len

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-05 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-05 20:09 regression / [PATCH] ACPI: fix fan/thermal resume Daniel Ritz
2006-07-05 23:22 Brown, Len

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.