lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200821181433.17653-8-kenneth.t.chan@gmail.com>
Date:   Sat, 22 Aug 2020 02:14:31 +0800
From:   Kenneth Chan <kenneth.t.chan@...il.com>
To:     platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     laforge@...monks.org, Kenneth Chan <kenneth.t.chan@...il.com>
Subject: [PATCH 7/9] resolve hotkey double trigger bug

Sometimes double ACPI events are triggered for brightness, vol and mute hotkeys. This
patch fixes it.


Signed-off-by: Kenneth Chan <kenneth.t.chan@...il.com>
---
 drivers/platform/x86/panasonic-laptop.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index 3b0294ee9d3e..6779099a3ec9 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -13,6 +13,7 @@
  *
  * ChangeLog:
  *	Aug.18, 2020	Kenneth Chan <kenneth.t.chan@...il.com>
+ *			resolve hotkey double trigger
  *			add write support to mute
  *			fix sticky_key init bug
  *			fix naming of platform files for consistency with other
@@ -597,9 +598,11 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
 					result & 0xf, 0x80, false);
 	}
 
-	if (!sparse_keymap_report_event(hotk_input_dev,
-					result & 0xf, result & 0x80, false))
-		pr_err("Unknown hotkey event: 0x%04llx\n", result);
+	if ((result & 0xf) == 0x7 || (result & 0xf) == 0x9 || (result & 0xf) == 0xa) {
+		if (!sparse_keymap_report_event(hotk_input_dev,
+						result & 0xf, result & 0x80, false))
+			pr_err("Unknown hotkey event: 0x%04llx\n", result);
+	}
 }
 
 static void acpi_pcc_hotkey_notify(struct acpi_device *device, u32 event)
-- 
2.17.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ