Subject: change to PCI interrupt mapping coming soon..
To: None <tech-kern@netbsd.org, netbsd-ports@netbsd.org,>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: tech-kern
Date: 12/27/2000 23:20:15
As discussed a little while back, I will soon (tomorrow?) be
committing changes to the PCI interrupt mapping API to simultaneously
simplify it and increase its flexibility.

I'll commit a pci_intr(9) man page along with the change..

Quick summary:

 - pci_intr_map() was passed 4 parameters identifying the interrupt
pint which in all cases came from "struct pci_attach_args".
 - on many/most platforms it only needed one or two of these parameters.
 - Certain ways of doing interrupt mapping on x86 systems using the
Intel Multiprocessor spec need additional parameters not included in
the pci_intr_map arg list (namely, the unswizzled bus tag).
 - these parameters are present in "struct pci_attach_args"

So, the obvious answer is to just simplify the API and pass a "struct
pci_attach_args *" to pci_intr_map()

99% of PCI drivers need only a one-line change:

diff -u -r1.11 if_fxp_pci.c
--- dev/pci/if_fxp_pci.c        2000/09/27 10:54:55     1.11
+++ dev/pci/if_fxp_pci.c        2000/12/28 02:30:09
@@ -369,8 +369,7 @@
        /*
         * Map and establish our interrupt.
         */
-       if (pci_intr_map(pc, pa->pa_intrtag, pa->pa_intrpin,
-           pa->pa_intrline, &ih)) {
+       if (pci_intr_map(pa, &ih)) {
                printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname);
                return;
        }

				- Bill