Subject: Re: panic in ACPI configuration
To: Arne H. Juul <arnej@pvv.ntnu.no>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 08/24/2007 21:02:51
--x9uCfsizvaabZDbV
Content-Type: multipart/mixed; boundary="vnj+srGq+/SN26DJ"
Content-Disposition: inline


--vnj+srGq+/SN26DJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Aug 23, 2007 at 10:49:32PM +0200, Arne H. Juul wrote:
> On Thu, 23 Aug 2007, Quentin Garnier wrote:
> >On Wed, Aug 22, 2007 at 11:03:12PM +0200, Arne H. Juul wrote:
> >>I've recently gotten a new machine running NetBSD/i386,
> >>and with a current GENERIC kernel I'm getting a panic during
> >>initial kernel configuration:
> >>
> >>panic: pci_make_tag: bad request
> >>
> >>does anyone have any tips for what could be wrong?
> >
> >Yes.  Try the attached patch (in sys/dev/acpi/acpica).
>=20
> thanks - that works!  dmesg at the end.

Try the attached patch instead.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--vnj+srGq+/SN26DJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Content-Transfer-Encoding: quoted-printable

Index: OsdHardware.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/dev/acpi/acpica/OsdHardware.c,v
retrieving revision 1.2
diff -u -r1.2 OsdHardware.c
--- OsdHardware.c	14 May 2006 21:42:26 -0000	1.2
+++ OsdHardware.c	24 Aug 2007 19:01:05 -0000
@@ -285,6 +285,8 @@
 	ACPI_OBJECT_TYPE type;
 	ACPI_PCI_ID *id;
 	ACPI_INTEGER v;
+	ACPI_BUFFER buf;
+	ACPI_DEVICE_INFO *devinfo;
 	int bus;
=20
 	id =3D *PciId;
@@ -305,6 +307,20 @@
 		if (ACPI_FAILURE(rv) || type !=3D ACPI_TYPE_DEVICE)
 			return bus;
=20
+		buf.Pointer =3D NULL;
+		buf.Length =3D ACPI_ALLOCATE_BUFFER;
+		rv =3D AcpigetObjectInfo(handle, &buf);
+		if (ACPI_FAILURE(rv))
+			return bus;
+
+		devinfo =3D buf.Pointer;
+		if ((devinfo->Valid & ACPI_VALID_STA) &&
+		    (devinfo->CurrentStatus & ACPi_STA_OK) !=3D ACPI_STA_OK) {
+			AcpiOsFree(buf.Pointer);
+			return bus;
+		}
+		AcpiOsFree(buf.Pointer);
+
 		rv =3D acpi_eval_integer(handle, METHOD_NAME__ADR, &v);
=20
 		if (ACPI_FAILURE(rv))

--vnj+srGq+/SN26DJ--

--x9uCfsizvaabZDbV
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRs8rW9goQloHrPnoAQIlAwf/ahOanZ9sbzeT4sR2STl1ra6axP+4ytrS
ec10fRyXHBAKRTjI0j8exAw6YWxIWAvtsxCrCa1/qHZp32zvefSkSS9Ugs+zwUaj
qsfVPE/BKgSybjze1QeeIMiAwpSUcMkSt1kAIWxzNp8d+7ygWe0xD9GkUhNDY+3Z
Ii3mgwQdGPnNqn+0dvV3qsfAYhzBD8in4zJHEKaR+Gg0Q9pXAhOSr5AMnqGgrW1M
cAq0hY5FlulT0+s8+hntw7fLYnmhdQUsDagw8b892XRZmoWhD13THyZtb/M4OVVI
9b5RLt3KHHiRapqT2De60CFUxd9HcN/W7npXH5wMY9tmzXtjHhVTtw==
=Gfaq
-----END PGP SIGNATURE-----

--x9uCfsizvaabZDbV--