Date: Thu, 8 Dec 2005 14:37:35 +0300 From: Yuri Skripachov <skripachov@mail.ru> To: freebsd-acpi@freebsd.org Subject: Re: Toshiba Satellite P10 + wrong battery state reported by ACPIIO_BATT_GET_BATTINFO. Message-ID: <200512081437.36332.skripachov@mail.ru> In-Reply-To: <200512071659.58560.skripachov@mail.ru> References: <200512071659.58560.skripachov@mail.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
> Which way is right? It seems to me that right way is to define ACPI_BATT_STAT_NOT_PRESENT as (ACPI_BATT_STAT_CHARGING | ACPI_BATT_STAT_DISCHARG) because these bits are mutually exclusive and must not both be set at the same time. Even in critical state. And then change the acpi_battery_bst_valid() in dev/acpica/acpi_battery.c. -- cut /* Check _BST results for validity. */ int acpi_battery_bst_valid(struct acpi_bst *bst) { if ((bst->state & ACPI_BATT_STAT_NOT_PRESENT) == ACPI_BATT_STAT_NOT_PRESENT || bst->cap == 0xffffffff || bst->volt == 0xffffffff) return (FALSE); else return (TRUE); } -- cut -- Best regards, Yuri Skripachov mailto:skripachov@mail.ru "The faster I go, the behinder I get." -- Lewis Carroll --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512081437.36332.skripachov>