Module Name: src
Committed By: sborrill
Date: Mon Oct 5 10:11:34 UTC 2009
Modified Files:
src/sys/dev/acpi [netbsd-5]: acpi_bat.c
Log Message:
Pull up revision 1.74 (requested by jmcneill in ticket #1067)
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.69 -r1.69.8.1 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.69 src/sys/dev/acpi/acpi_bat.c:1.69.8.1
--- src/sys/dev/acpi/acpi_bat.c:1.69 Tue Jun 3 15:02:31 2008
+++ src/sys/dev/acpi/acpi_bat.c Mon Oct 5 10:11:34 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_bat.c,v 1.69 2008/06/03 15:02:31 jmcneill Exp $ */
+/* $NetBSD: acpi_bat.c,v 1.69.8.1 2009/10/05 10:11:34 sborrill 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.69 2008/06/03 15:02:31 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.69.8.1 2009/10/05 10:11:34 sborrill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -782,6 +782,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;