From owner-acpi-jp@jp.freebsd.org  Wed Mar  7 02:03:50 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id CAA32343;
	Wed, 7 Mar 2001 02:03:50 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from webcom.it (brian.inet.it [213.92.4.195])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with SMTP id CAA32336
	for <acpi-jp@jp.freebsd.org>; Wed, 7 Mar 2001 02:03:48 +0900 (JST)
	(envelope-from andrea@webcom.it)
Received: (qmail 808 invoked by uid 1000); 6 Mar 2001 17:00:10 -0000
Date: Tue, 6 Mar 2001 18:00:07 +0100
From: Andrea Campi <andrea@webcom.it>
To: acpi-jp@jp.freebsd.org
Cc: iwasaki@jp.freebsd.org
Message-ID: <20010306180006.A474@webcom.it>
References: <20010305120159.A535@webcom.it> <20010306214734D.iwasaki@jp.FreeBSD.org> <20010306141642.C421@webcom.it> <20010307002422X.iwasaki@jp.FreeBSD.org> <20010306174034.B529@webcom.it>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <20010306174034.B529@webcom.it>; from andrea@webcom.it on Tue, Mar 06, 2001 at 05:40:34PM +0100
X-Echelon: BND CIA NSA Mossad KGB MI6 IRA detonator nuclear assault strike
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1089
Subject: [acpi-jp 1089] Re: Bug in battery support in IBM Thinkpad?
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: andrea@webcom.it

Working. Of course now I get:

acpi0: <PTLTD    RSDT  > on motherboard
acpi0: power button is handled as a fixed feature programming model.
acpi_tz0: <thermal zone> on acpi0
acpi_acad0: <AC adapter> on acpi0
acpi_acad0: On Line
acpi_cmbat0: <Control method Battery> on acpi0
acpi_cmbat0: Battery info corrupted
acpi_cmbat0: Battery status corrupted
acpi_cmbat1: <Control method Battery> on acpi0
acpi_cmbat1: Battery info corrupted
acpi_cmbat1: Battery status corrupted
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Control Method Sleep Button Device> on acpi0
acpi_pcib0: <Host-PCI bridge> on acpi0


However, having just the printf in the macro gave idx = 0. As I said, EVERYTHING
is corrupted ;-)


As a side note, I'm trying your acpicatools port, but the machine is VERY slow.
A (admittedly silly) test with

lmdd if=/dev/ad0s2 bs=1024k count=50

gives ~ 7.2 MB/s down from 11+ MB/s without ACPI, everything else being equal,
today -CURRENT. Don't know why, don't know how to investigate.

Bye,
	Andrea

Bye,
	Andrea

On Tue, Mar 06, 2001 at 05:40:34PM +0100, Andrea Campi wrote:
> Currently making kernel... You have a typo:
> 
> > @@ -135,10 +146,12 @@
> >  		return;
> >  	}
> >  
> > -	res = sc->bst_buffer.Pointer;
> > +	res = (ACPI_OBJECT *)sc->bst_buffer.Pointer;
> >  
> > -	if ((res->Type != ACPI_TYPE_PACKAGE) && (res->Package.Count < 4))
> > -		return ;
> > +	if ((res->Type != ACPI_TYPE_PACKAGE) && (res->Package.Count != 4)) {
> > +		device_printf(dev, "Battery status corrupted\n",);
> 							     ^^^^
> > +		return;
> > +	}
> >  
> >  	PKG_GETINT(res, tmp, 0, sc->bst.state, end);
> >  	PKG_GETINT(res, tmp, 1, sc->bst.rate, end);
> 
> Same on line 205.
> 
> 
> -- 
>                    Press every key to continue.

-- 
            Secret hacker rule #11: hackers read manuals.
