Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi If the driver thinks a battery is not present, ...



details:   https://anonhg.NetBSD.org/src/rev/d718a2ae1e96
branches:  trunk
changeset: 747728:d718a2ae1e96
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Sep 29 21:41:38 2009 +0000

description:
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.

diffstat:

 sys/dev/acpi/acpi_bat.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 1ea070c52db3 -r d718a2ae1e96 sys/dev/acpi/acpi_bat.c
--- a/sys/dev/acpi/acpi_bat.c   Tue Sep 29 19:00:45 2009 +0000
+++ b/sys/dev/acpi/acpi_bat.c   Tue Sep 29 21:41:38 2009 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index