Module Name: src
Committed By: jmcneill
Date: Tue Sep 29 21:41:39 UTC 2009
Modified Files:
src/sys/dev/acpi: acpi_bat.c
Log Message:
If the driver thinks a battery is not present, poll for present status.
Workaround for firmware that doesn't report battery present status
immediately at boot and doesn't issue a subsequent notify when the
information becomes available.
To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/acpi/acpi_bat.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/acpi/acpi_bat.c
diff -u src/sys/dev/acpi/acpi_bat.c:1.73 src/sys/dev/acpi/acpi_bat.c:1.74
--- src/sys/dev/acpi/acpi_bat.c:1.73 Wed Sep 16 10:47:54 2009
+++ src/sys/dev/acpi/acpi_bat.c Tue Sep 29 21:41:38 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.73 2009/09/16 10:47:54 mlelstv Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.74 2009/09/29 21:41:38 jmcneill Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.73 2009/09/16 10:47:54 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.74 2009/09/29 21:41:38 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -785,6 +785,9 @@
ACPI_STATUS rv;
struct timeval tv, tmp;
+ if (!ABAT_ISSET(sc, ABAT_F_PRESENT))
+ acpibat_battery_present(dv);
+
if (ABAT_ISSET(sc, ABAT_F_PRESENT)) {
tmp.tv_sec = 5;
tmp.tv_usec = 0;