From nobody@FreeBSD.org  Tue Sep 20 04:07:37 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E0E06106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Sep 2011 04:07:37 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id D1D148FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Sep 2011 04:07:37 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p8K47bOm015959
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 20 Sep 2011 04:07:37 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p8K47bT5015958;
	Tue, 20 Sep 2011 04:07:37 GMT
	(envelope-from nobody)
Message-Id: <201109200407.p8K47bT5015958@red.freebsd.org>
Date: Tue, 20 Sep 2011 04:07:37 GMT
From: Eric McCorkle <eric@shadowsun.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ACPI Battery Monitor Non-Functional
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160838
>Category:       kern
>Synopsis:       [acpi] ACPI Battery Monitor Non-Functional
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-acpi
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 20 04:10:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Mon Apr  8 18:40:00 UTC 2013
>Originator:     Eric McCorkle
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD atom-edge 9.0-BETA2 FreeBSD 9.0-BETA2 #41: Mon Sep 19 19:02:17 EDT 2011     root@atom-edge:/usr/obj/usr/src/sys/CUSTOM  amd64
>Description:
Recently updated sources, which caused acpiconf -i0 to stop reporting information about the battery properly.  Instead, it reports "not present", and 0 for all values, except charge (which reports as -1).

I have already identified the root cause for the problem.
>How-To-Repeat:
The problem should occur on any system with a battery using the cmbat interface, which dispatches a large number of calls via AcpiOsExecute during initialization.  This fills up the task queue, which results in the call to acpi_cmbat_init_battery getting dropped due to the queue being full, which results in the bif information not being properly initialized.  Because the cmbat driver only reads this information at initalization, the driver will incorrectly report the battery as not being present.

Similar issues with other ACPI features may have a similar root cause.
>Fix:
Setting debug.acpi.max_tasks to a high value (I used 128) is a stable workaround, and will restore functionality.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-acpi 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Oct 10 04:38:02 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160838 

From: hiren panchasara <hiren.panchasara@gmail.com>
To: bug-followup@FreeBSD.org, eric@shadowsun.net
Cc:  
Subject: Re: kern/160838: [acpi] ACPI Battery Monitor Non-Functional
Date: Mon, 8 Apr 2013 11:35:29 -0700

 --089e0163450a81955c04d9ddb34f
 Content-Type: text/plain; charset=UTF-8
 
 As far as I can tell, this issue should be fixed after
 http://svnweb.freebsd.org/base/head/sys/dev/acpica/acpivar.h?revision=242922&view=markupwhich
 increased the MAX_TASKS value.
 
 If so, we can close this one.
 
 Thanks,
 Hiren
 
 --089e0163450a81955c04d9ddb34f
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr">As far as I can tell, this issue should be fixed after <a =
 href=3D"http://svnweb.freebsd.org/base/head/sys/dev/acpica/acpivar.h?revisi=
 on=3D242922&amp;view=3Dmarkup">http://svnweb.freebsd.org/base/head/sys/dev/=
 acpica/acpivar.h?revision=3D242922&amp;view=3Dmarkup</a> which increased th=
 e MAX_TASKS value.<br>
 <br>If so, we can close this one.<br><br>Thanks,<br>Hiren<br></div>
 
 --089e0163450a81955c04d9ddb34f--
>Unformatted:
