mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Seth Forshee <seth.forshee@canonical.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: Len Brown <lenb@kernel.org>,
	Azael Avalos <coproscefalo@gmail.com>,
	Thomas Renninger <trenn@suse.de>,
	platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Seth Forshee <seth.forshee@canonical.com>
Subject: [PATCH v2 4/4] toshiba_acpi: Add blacklist for models with hotkey problems
Date: Tue,  3 Jan 2012 13:02:38 -0600	[thread overview]
Message-ID: <1325617358-8286-5-git-send-email-seth.forshee@canonical.com> (raw)
In-Reply-To: <1325617358-8286-1-git-send-email-seth.forshee@canonical.com>

Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:

 ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 toshiba_acpi: ACPI INFO method execution failed
 toshiba_acpi: Failed to query hotkey event

To work around this, add a blacklist of models with hotkey problems and
disable the use of hotkeys on these machines.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 drivers/platform/x86/toshiba_acpi.c |   39 +++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 6824bf7..fbb8318 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -54,6 +54,7 @@
 #include <linux/slab.h>
 #include <linux/workqueue.h>
 #include <linux/i8042.h>
+#include <linux/dmi.h>
 
 #include <asm/uaccess.h>
 
@@ -174,6 +175,39 @@ static const struct key_entry toshiba_acpi_keymap[] __devinitconst = {
 	{ KE_END, 0 },
 };
 
+/* Machines for which hotkeys should not be enabled */
+static struct dmi_system_id __devinitdata toshiba_hotkey_blacklist[] = {
+	{
+		.ident = "Toshiba Satellite C670-10V",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C670-10V"),
+		},
+	},
+	{
+		.ident = "Toshiba Satellite C670-12E",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE C670-12E"),
+		},
+	},
+	{
+		.ident = "Toshiba Satellite U500",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE U500"),
+		},
+	},
+	{
+		.ident = "Toshiba Satellite Pro L770-116",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE PRO L770-116"),
+		},
+	},
+	{}
+};
+
 /* utility
  */
 
@@ -935,6 +969,11 @@ static int __devinit toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev)
 	int error;
 	u32 hci_result;
 
+	if (dmi_check_system(toshiba_hotkey_blacklist)) {
+		pr_info("Model has known hotkey problems, hotkeys will be disabled\n");
+		return 0;
+	}
+
 	dev->hotkey_dev = input_allocate_device();
 	if (!dev->hotkey_dev) {
 		pr_info("Unable to register input device\n");
-- 
1.7.5.4


  parent reply	other threads:[~2012-01-03 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 19:02 [PATCH v2 0/4] toshiba_acpi: Expanded hotkey support Seth Forshee
2012-01-03 19:02 ` [PATCH v2 1/4] ACPI: EC: Add ec_get_handle() Seth Forshee
2012-01-05 18:22   ` Matthew Garrett
     [not found]   ` <CAPbh3ruqMQ8UFSehm7vX5i8YWzRFwF5=TX_f4n4dVkvmQa9Njw@mail.gmail.com>
2012-01-05 19:34     ` Seth Forshee
2012-01-07 20:55       ` Konrad Rzeszutek Wilk
2012-01-07 21:26         ` Matthew Garrett
2012-01-03 19:02 ` [PATCH v2 2/4] toshiba_acpi: Support alternate hotkey interfaces Seth Forshee
2012-01-05 18:25   ` Matthew Garrett
2012-01-05 19:43     ` Seth Forshee
2012-01-05 19:47       ` Matthew Garrett
2012-01-03 19:02 ` [PATCH v2 3/4] toshiba_acpi: Support additional hotkey scancodes Seth Forshee
2012-01-03 19:02 ` Seth Forshee [this message]
2012-01-05 18:26   ` [PATCH v2 4/4] toshiba_acpi: Add blacklist for models with hotkey problems Matthew Garrett
2012-01-05 19:32     ` Seth Forshee
2012-01-05 19:34       ` Matthew Garrett
2012-01-05 20:04         ` Seth Forshee
2012-01-05 20:09           ` Matthew Garrett
2012-01-05 20:24             ` Seth Forshee
2012-01-05 20:46       ` Moore, Robert
2012-01-05 20:58         ` Seth Forshee

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=1325617358-8286-5-git-send-email-seth.forshee@canonical.com \
    --to=seth.forshee@canonical.com \
    --cc=coproscefalo@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=trenn@suse.de \
    /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

all inboxes | Powered by JetHome®