NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/37538 (The BIOS on Dell D400 laptops routes interrupts properly, but doesn't report it to the ACPI tables.)
The following reply was made to PR kern/37538; it has been noted by GNATS.
From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/37538 (The BIOS on Dell D400 laptops routes interrupts
properly, but doesn't report it to the ACPI tables.)
Date: Thu, 29 May 2008 22:16:02 +0200
--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, May 21, 2008 at 10:12:42PM +0000, joerg%NetBSD.org@localhost wrote:
> Synopsis: The BIOS on Dell D400 laptops routes interrupts properly,
> but doesn't report it to the ACPI tables.
Please try the attached patch.
Joerg
--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="acpi-ambigous-prt.diff"
Index: mpacpi.c
===================================================================
RCS file: /data/repo/netbsd/src/sys/arch/x86/x86/mpacpi.c,v
retrieving revision 1.58
diff -u -p -r1.58 mpacpi.c
--- mpacpi.c 26 Apr 2008 15:13:00 -0000 1.58
+++ mpacpi.c 29 May 2008 20:14:26 -0000
@@ -690,7 +690,7 @@ mpacpi_pciroute(struct mpacpi_pcibus *mp
ACPI_PCI_ROUTING_TABLE *ptrp;
ACPI_HANDLE linkdev;
char *p;
- struct mp_intr_map *mpi;
+ struct mp_intr_map *mpi, *iter;
struct mp_bus *mpb;
struct pic *pic;
unsigned dev;
@@ -714,11 +714,25 @@ mpacpi_pciroute(struct mpacpi_pcibus *mp
break;
dev = ACPI_HIWORD(ptrp->Address);
- mpi = &mp_intrs[mpacpi_intr_index++];
+ mpi = &mp_intrs[mpacpi_intr_index];
mpi->bus_pin = (dev << 2) | ptrp->Pin;
mpi->bus = mpb;
mpi->type = MPS_INTTYPE_INT;
+ /*
+ * First check if an entry for this device/pin combination
+ * was already found. Some DSDTs have more than one entry
+ * and it seems that the first is generally the right one.
+ */
+ for (iter = mpb->mb_intrs; iter != NULL; iter = iter->next) {
+ if (iter->bus_pin == mpi->bus_pin)
+ break;
+ }
+ if (iter != NULL)
+ continue;
+
+ ++mpacpi_intr_index;
+
if (ptrp->Source[0] != 0) {
if (mp_verbose > 1)
printf("pciroute: dev %d INT%c on lnkdev %s\n",
--XsQoSWH+UP9D9v3l--
Home |
Main Index |
Thread Index |
Old Index