linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Drake <drake@endlessm.com>
Subject: [PATCH 3/6] ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers()
Date: Thu, 27 Feb 2020 23:22:33 +0100	[thread overview]
Message-ID: <3205130.aMxiE8xfpn@kreacher> (raw)
In-Reply-To: <2094703.CetWLLyMuz@kreacher>

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

If the status value returned by acpi_install_address_space_handler()
in ec_install_handlers() is AE_NOT_FOUND, it is treated in a special
way, apparently because it might mean a _REG method evaluation
failure (at least that is the case according to the comment in
there), but acpi_install_address_space_handler() does not take
_REG evaluation errors into account at all, so the AE_NOT_FOUND
special handling is confusing at best.

For this reason, change ec_install_handlers() to stop the EC and
return -ENODEV on all acpi_install_address_space_handler() errors.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/ec.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 3153e7684053..6f501d552e6e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1489,19 +1489,8 @@ static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device)
 							    &acpi_ec_space_handler,
 							    NULL, ec);
 		if (ACPI_FAILURE(status)) {
-			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.
-				 */
-				pr_err("Fail in evaluating the _REG object"
-					" of EC device. Broken bios is suspected.\n");
-			} else {
-				acpi_ec_stop(ec, false);
-				return -ENODEV;
-			}
+			acpi_ec_stop(ec, false);
+			return -ENODEV;
 		}
 		set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
 	}
-- 
2.16.4






  parent reply	other threads:[~2020-02-27 22:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 22:19 [PATCH 0/6] ACPI: EC: Updates related to initialization Rafael J. Wysocki
2020-02-27 22:21 ` [PATCH 1/6] ACPI: EC: Avoid printing confusing messages in acpi_ec_setup() Rafael J. Wysocki
2020-02-27 22:21 ` [PATCH 2/6] ACPI: EC: Avoid passing redundant argument to functions Rafael J. Wysocki
2020-02-27 22:22 ` Rafael J. Wysocki [this message]
2020-02-27 22:23 ` [PATCH 4/6] ACPI: EC: Unify handling of event handler installation failures Rafael J. Wysocki
2020-02-27 22:23 ` [PATCH 5/6] ACPI: EC: Simplify acpi_ec_add() Rafael J. Wysocki
2020-02-27 22:24 ` [PATCH 6/6] ACPI: EC: Use fast path in acpi_ec_add() for DSDT boot EC Rafael J. Wysocki
2020-02-28  9:43 ` [PATCH 0/6] ACPI: EC: Updates related to initialization Daniel Drake
2020-03-02  5:53   ` Jian-Hong Pan
2020-03-02  9:55     ` Rafael J. Wysocki
2020-03-02 10:38     ` Rafael J. Wysocki
2020-03-02 11:45       ` Rafael J. Wysocki
2020-03-03  7:28         ` Jian-Hong Pan
2020-03-03  9:09           ` Rafael J. Wysocki
2020-03-03 22:23             ` Rafael J. Wysocki
2020-03-04  2:53               ` Jian-Hong Pan
2020-03-04  9:13                 ` Rafael J. Wysocki
2020-03-04 10:42 ` [PATCH v2 " Rafael J. Wysocki
2020-03-04 10:44   ` [PATCH v2 1/6] ACPI: EC: Avoid printing confusing messages in acpi_ec_setup() Rafael J. Wysocki
2020-03-04 10:45   ` [PATCH v2 2/6] ACPI: EC: Avoid passing redundant argument to functions Rafael J. Wysocki
2020-03-04 10:46   ` [PATCH v2 3/6] ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers() Rafael J. Wysocki
2020-03-04 10:48   ` [PATCH v2 4/6] ACPI: EC: Simplify acpi_ec_add() Rafael J. Wysocki
2020-03-04 10:49   ` [PATCH v2 5/6] ACPI: EC: Use fast path in acpi_ec_add() for DSDT boot EC Rafael J. Wysocki
2020-03-04 10:52   ` [PATCH v2 6/6] ACPI: EC: Consolidate event handler installation code Rafael J. Wysocki

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=3205130.aMxiE8xfpn@kreacher \
    --to=rjw@rjwysocki.net \
    --cc=drake@endlessm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).