From owner-acpi-jp@jp.freebsd.org  Tue Mar  6 21:47:41 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id VAA18257;
	Tue, 6 Mar 2001 21:47:41 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id VAA18252
	for <acpi-jp@jp.freebsd.org>; Tue, 6 Mar 2001 21:47:40 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	by tasogare.imasy.or.jp (8.11.2+3.4W/3.7W-tasogare/smtpfeed 1.10) with ESMTP id f26ClZW48458;
	Tue, 6 Mar 2001 21:47:35 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: acpi-jp@jp.freebsd.org, andrea@webcom.it
Cc: msmith@FreeBSD.org
In-Reply-To: <20010305120159.A535@webcom.it>
References: <20010304163716.A514@webcom.it>
	<20010305120159.A535@webcom.it>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20010306214734D.iwasaki@jp.FreeBSD.org>
Date: Tue, 06 Mar 2001 21:47:34 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 21
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1082
Subject: [acpi-jp 1082] 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: iwasaki@jp.freebsd.org

> Ok, I came up with a patch that fixes the issue for me. I am almost sure this
> issue must plague all IBM Thinkpad owners, so I ask ACPI experts to please
> review this, and I would be really happy if anybody would commit this. That is,
> unless anybody can come up with something better - but at least now I can get
> ACPI to work.

The patch looks good, but I'd like to track it down a bit.
Could you change

 #define PKG_GETINT(res, tmp, idx, dest, label) do {			\
 	tmp = &res->Package.Elements[idx];				\
+	if (tmp == NULL) {						\
+		device_printf(dev, "sc == NULL");			\

to

	device_printf(dev, "%s: PKG_GETINT idx = %d\n", __FUNCTION__, idx);

and report the output again?

Thanks
