rpms/kernel/devel linux-2.6-acpi-handle-ec-init-failure.patch, NONE, 1.1 kernel.spec, 1.1116, 1.1117

Dave Jones davej at fedoraproject.org
Wed Nov 5 21:16:22 UTC 2008


Author: davej

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32142

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-acpi-handle-ec-init-failure.patch 
Log Message:
ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize EC (#435653)

linux-2.6-acpi-handle-ec-init-failure.patch:

--- NEW FILE linux-2.6-acpi-handle-ec-init-failure.patch ---
Subject:ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize EC 
From: Zhao Yakui <yakui.zhao at intel.com>

On some broken BIOS the ACPI object in EC _REG method can't be found in
ACPI namespace, which causes that the AE_NOT_FOUND status code is returned by
the EC _REG object. In such case the EC device can't be initialized correctly, 
which causes that battery/AC adapter can't work normally. As the EC address
space handler is not removed and the memory pointed by its input argument is
already free, sometimes the kernel will also be panic when EC internal register
is still accessed. But the windows can work well on such broken BIOS.

Maybe it will be reasonable that OS ignores the AE_NOT_FOUND error 
returned by the EC _REG object and continues to initialize EC device 
for some broken BIOS. Of course the warning message will be printed.
For example: the ACPI object in EC _REG method can't be found and status error
code is AE_NOT_FOUND. 

http://bugzilla.kernel.org/show_bug.cgi?id=8953
http://bugzilla.kernel.org/show_bug.cgi?id=10237

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
Signed-off-by: Lin Ming <ming.m.lin at intel.com>

---
 drivers/acpi/ec.c |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/acpi/ec.c
===================================================================
--- linux-2.6.orig/drivers/acpi/ec.c
+++ linux-2.6/drivers/acpi/ec.c
@@ -835,8 +835,19 @@ static int ec_install_handlers(struct ac
 						    &acpi_ec_space_handler,
 						    NULL, ec);
 	if (ACPI_FAILURE(status)) {
-		acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler);
-		return -ENODEV;
+		if (status == AE_NOT_FOUND) {
+			/*
+			 * Maybe OS fails in evaluating the _REG object.
+			 * The AE_NOT_FOUND error will be ignored and OS
+			 * continue to initialize EC.
+			 */
+			printk(KERN_ERR "Fail in evaluating _REG object."
+				" It is broken BIOS.\n");
+		} else {
+			acpi_remove_gpe_handler(NULL, ec->gpe,
+				&acpi_ec_gpe_handler);
+			return -ENODEV;
+		}
 	}
 
 	ec->handlers_installed = 1;


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1116
retrieving revision 1.1117
diff -u -r1.1116 -r1.1117
--- kernel.spec	5 Nov 2008 19:23:09 -0000	1.1116
+++ kernel.spec	5 Nov 2008 21:15:52 -0000	1.1117
@@ -619,6 +619,7 @@
 Patch391: linux-2.6-acpi-video-dos.patch
 Patch392: linux-2.6-acpi-clear-wake-status.patch
 Patch393: linux-2.6-acpi-ignore-reset_reg_sup.patch
+Patch394: linux-2.6-acpi-handle-ec-init-failure.patch
 Patch400: linux-2.6-scsi-cpqarray-set-master.patch
 Patch420: linux-2.6-squashfs.patch
 Patch430: linux-2.6-net-silence-noisy-printks.patch
@@ -1177,6 +1178,7 @@
 ApplyPatch linux-2.6-acpi-video-dos.patch
 ApplyPatch linux-2.6-acpi-clear-wake-status.patch
 ApplyPatch linux-2.6-acpi-ignore-reset_reg_sup.patch
+ApplyPatch linux-2.6-acpi-handle-ec-init-failure.patch
 
 # Various low-impact patches to aid debugging.
 ApplyPatch linux-2.6-debug-sizeof-structs.patch
@@ -1920,7 +1922,10 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
-* Wed Nov  5 2008 Jeremy Katz <katzj at redhat.com>
+* Wed Nov 05 2008 Dave Jones <davej at redhat.com> 2.6.27.4-81
+- ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize EC (#435653)
+
+* Wed Nov  5 2008 Jeremy Katz <katzj at redhat.com> 2.6.27.4-80
 - linux-2.6-olpc-touchpad.patch: backport from 2.6.28
   * Adds support for quirks of the OLPC touchpad
 




More information about the fedora-extras-commits mailing list