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-next>] [day] [month] [year] [list]
Date:	Tue,  2 Sep 2014 14:04:19 -0400
From:	Benjamin Tissoires <benjamin.tissoires@...hat.com>
To:	Darren Hart <dvhart@...radead.org>,
	platform-driver-x86@...r.kernel.org
Cc:	Matthew Garrett <matthew.garrett@...ula.com>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] platform/x86: toshiba: re-enable acpi hotkeys after suspend to disk

On the Toshiba Tecra Z40, after a suspend-to-disk, some FN hotkeys
driven by toshiba_acpi are not functional.

Calling the ACPI object ENAB on resume makes them back alive.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@...hat.com>
---

Hi guys,

we noticed this problem on a Toshiba Z40. I kind of brute-forced the thing, and
I ended up that calling "ENAB" was making the keys working again (rmmod/insmod 
the driver was sufficient, and the only command which was different from the
resume was this ACPI call).

I am really surprised some toshiba laptops do not need this, so I'd prefer that
an ACPI expert (Matthew???) gives its wisdom regarding that.

Cheers,
Benjamin

 drivers/platform/x86/toshiba_acpi.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index b062d3d..ba75701 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -1857,9 +1857,16 @@ static int toshiba_acpi_resume(struct device *device)
 {
 	struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device));
 	u32 result;
+	acpi_status status;
+
+	if (dev->hotkey_dev) {
+		status = acpi_evaluate_object(dev->acpi_dev->handle, "ENAB",
+				NULL, NULL);
+		if (ACPI_FAILURE(status))
+			pr_info("Unable to re-enable hotkeys\n");
 
-	if (dev->hotkey_dev)
 		hci_write1(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE, &result);
+	}
 
 	return 0;
 }
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ