Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/acpi Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/e213a52041d8
branches: netbsd-9
changeset: 368775:e213a52041d8
user: martin <martin%NetBSD.org@localhost>
date: Wed Aug 03 15:44:24 2022 +0000
description:
Pull up following revision(s) (requested by riastradh in ticket #1490):
sys/dev/acpi/thinkpad_acpi.c: revision 1.48
With the recent change of the EC address space handler, we no longer get
an ACPI_INTEGER in host byte order but a byte sized buffer with little
endian data.
Extract only the low 8 bits from buffer to get the fan speed again.
diffstat:
sys/dev/acpi/thinkpad_acpi.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r 4b4c99d6cca3 -r e213a52041d8 sys/dev/acpi/thinkpad_acpi.c
--- a/sys/dev/acpi/thinkpad_acpi.c Wed Aug 03 11:17:36 2022 +0000
+++ b/sys/dev/acpi/thinkpad_acpi.c Wed Aug 03 15:44:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: thinkpad_acpi.c,v 1.46.24.1 2020/01/31 11:17:32 martin Exp $ */
+/* $NetBSD: thinkpad_acpi.c,v 1.46.24.2 2022/08/03 15:44:24 martin Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.46.24.1 2020/01/31 11:17:32 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: thinkpad_acpi.c,v 1.46.24.2 2022/08/03 15:44:24 martin Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -702,6 +702,13 @@
edata->state = ENVSYS_SINVALID;
return;
}
+
+ /*
+ * Extract the low bytes from buffers
+ */
+ lo = ((uint8_t *)&lo)[0];
+ hi = ((uint8_t *)&hi)[0];
+
rpm = ((((int)hi) << 8) | ((int)lo));
if (rpm < 0) {
edata->state = ENVSYS_SINVALID;
Home |
Main Index |
Thread Index |
Old Index