From owner-freebsd-acpi@FreeBSD.ORG Wed Dec 7 14:00:17 2005 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35A8716A427 for ; Wed, 7 Dec 2005 14:00:05 +0000 (GMT) (envelope-from skripachov@mail.ru) Received: from mx6.mail.ru (mx6.mail.ru [194.67.23.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9349043D46 for ; Wed, 7 Dec 2005 14:00:04 +0000 (GMT) (envelope-from skripachov@mail.ru) Received: from [213.183.242.226] (port=18407 helo=satellite.osatec-msk.ru) by mx6.mail.ru with esmtp id 1Ejzpx-0005Hl-00 for freebsd-acpi@freebsd.org; Wed, 07 Dec 2005 17:00:01 +0300 From: Yuri Skripachov To: freebsd-acpi@freebsd.org Date: Wed, 7 Dec 2005 16:59:57 +0300 User-Agent: KMail/1.8.3 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512071659.58560.skripachov@mail.ru> Subject: Toshiba Satellite P10 + wrong battery state reported by ACPIIO_BATT_GET_BATTINFO. X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2005 14:00:17 -0000 Hi All, Checking _BST results in the acpi_battery_bst_valid() (acpi_battery.c) always brings about 'not present' state if I have plugged AC adapter as result of comparing battery state with ACPI_BATT_STAT_MAX (because 1.90 and 1.50 bioses use bit7 as a 'AC plugged' sign). Is this behaviour a ACPI BIOS bug? Could ACPI BIOS conforming to the specification report battery state more than ACPI_BATT_STAT_MAX (==0x7 now)? Currently I've wrapped _BST method by masking returned state with 0x7f. The same is possible for the acpi_battery_bst_valid() function in dev/acpica/acpi_battery.c Which way is right? -- Best regards, Yuri Skripachov "The faster I go, the behinder I get." -- Lewis Carroll --