All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: Alexey Starikovskiy <astarikovskiy@suse.de>
Subject: [PATCH 2/2] ACPI: EC: Fall back to DSDT scan if ECDT is broken
Date: Tue, 21 Aug 2007 17:22:59 +0400	[thread overview]
Message-ID: <46CAE733.1010109@suse.de> (raw)
In-Reply-To: <46CAE65E.3000703@suse.de>

From: Alexey Starikovskiy <astarikovskiy@suse.de>

Try to recover boot EC init in case of broken ECDT (bug #8651).

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---

 drivers/acpi/ec.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 33afcd1..ce9e97a 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -864,17 +864,20 @@ int __init acpi_ec_ecdt_probe(void)
         boot_ec->data_addr = ecdt_ptr->data.address;
         boot_ec->gpe = ecdt_ptr->gpe;
         status = acpi_get_handle(NULL, ecdt_ptr->id, &boot_ec->handle);
-        if (ACPI_FAILURE(status))
+        if (ACPI_FAILURE(status)) {
+            printk(KERN_ERR PREFIX "ECDT is broken\n");
             goto error;
+        }
         ec_complete_parse_device(boot_ec);
-    } else {
+    }
+    if (ACPI_FAILURE(status)) {
+        /* Try to recover boot_ec init */
         printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n");
         status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device,
-                        boot_ec, NULL);
+                      boot_ec, NULL);
         if (ACPI_FAILURE(status))
             goto error;
     }
-
     ret = ec_install_handlers(boot_ec);
     if (!ret) {
         first_ec = boot_ec;


  reply	other threads:[~2007-08-21 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-21 13:19 [PATCH 1/2] ACPI: EC: make boot_ec fully operational Alexey Starikovskiy
2007-08-21 13:22 ` Alexey Starikovskiy [this message]
2007-08-24  3:37   ` [PATCH 2/2] ACPI: EC: Fall back to DSDT scan if ECDT is broken Len Brown
2007-08-24  3:42     ` Alexey Starikovskiy
2007-08-24  5:17       ` Len Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46CAE733.1010109@suse.de \
    --to=astarikovskiy@suse.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.