rpms/kernel/F-13 linux-2.6-acpi-indirect_fan_control.patch, NONE, 1.1 kernel.spec, 1.2055, 1.2056

Matthew Garrett mjg59 at fedoraproject.org
Mon Jun 7 16:43:21 UTC 2010


Author: mjg59

Update of /cvs/pkgs/rpms/kernel/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv15105

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-acpi-indirect_fan_control.patch 
Log Message:
* Mon Jun 07 2010 Matthew Garrett <mjg at redhat.com>
- linux-2.6-acpi-indirect_fan_control.patch: fix some ACPI fans (rh#531916)


linux-2.6-acpi-indirect_fan_control.patch:
 bus.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- NEW FILE linux-2.6-acpi-indirect_fan_control.patch ---
commit 0c99c5288eb9b1bbc9684b0ec0fd7efc578749b3
Author: Zhang Rui <rui.zhang at intel.com>
Date:   Thu Dec 17 16:02:08 2009 +0800

    ACPI: Disable explicit power state retrieval on fans
    
    If the ACPI power state can be got both directly and indirectly,
    we prefer to get it indirectly.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=531916 describes a
    system with a _PSC method for the fan that always returns "on".
    There's no benefit in us always requesting the state of the fan
    when performing transitions - we want to do everything we can
    to ensure that the fan turns on when it should do, not risk
    hardware damage by believing the hardware when it tells us the
    fan is already on. Given that the Leading Other OS(tm) works fine
    on this machine, it seems likely that it behaves in much this way.
    
    inspired-by: Matthew Garrett <mjg at redhat.com>
    Signed-off-by: Zhang Rui <rui.zhang at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index cf761b9..ae9226d 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -190,16 +190,16 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
 		 * Get the device's power state either directly (via _PSC) or
 		 * indirectly (via power resources).
 		 */
-		if (device->power.flags.explicit_get) {
+		if (device->power.flags.power_resources) {
+			result = acpi_power_get_inferred_state(device);
+			if (result)
+				return result;
+		} else if (device->power.flags.explicit_get) {
 			status = acpi_evaluate_integer(device->handle, "_PSC",
 						       NULL, &psc);
 			if (ACPI_FAILURE(status))
 				return -ENODEV;
 			device->power.state = (int)psc;
-		} else if (device->power.flags.power_resources) {
-			result = acpi_power_get_inferred_state(device);
-			if (result)
-				return result;
 		}
 
 		*state = device->power.state;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-13/kernel.spec,v
retrieving revision 1.2055
retrieving revision 1.2056
diff -u -p -r1.2055 -r1.2056
--- kernel.spec	7 Jun 2010 04:41:08 -0000	1.2055
+++ kernel.spec	7 Jun 2010 16:43:21 -0000	1.2056
@@ -685,6 +685,7 @@ Patch580: linux-2.6-sparc-selinux-mprote
 Patch581: linux-2.6-selinux-avtab-size.patch
 
 Patch600: linux-2.6-acpi-sleep-live-sci-live.patch
+Patch601: linux-2.6-acpi-indirect_fan_control.patch
 
 Patch610: hda_intel-prealloc-4mb-dmabuffer.patch
 
@@ -1362,6 +1363,7 @@ ApplyPatch linux-2.6-defaults-aspm.patch
 
 # ACPI
 ApplyPatch linux-2.6-acpi-sleep-live-sci-live.patch
+ApplyPatch linux-2.6-acpi-indirect_fan_control.patch
 
 # ALSA
 ApplyPatch hda_intel-prealloc-4mb-dmabuffer.patch
@@ -2187,6 +2189,9 @@ fi
 # and build.
 
 %changelog
+* Mon Jun 07 2010 Matthew Garrett <mjg at redhat.com>
+- linux-2.6-acpi-indirect_fan_control.patch: fix some ACPI fans (rh#531916)
+
 * Mon Jun 07 2010 Ben Skeggs <bskeggs at redhat.com>
 - nouveau: fix iommu errors on GeForce 8 and newer chipsets (rh#561267)
 



More information about the scm-commits mailing list