diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-30 13:54:15 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-03-30 13:54:15 +0000 |
commit | 686342425694c618617627d676c3bc27a01f6c98 (patch) | |
tree | e093bc127c53f17200f4349df6463435bbd6c0b2 /sys/arch/macppc/pci | |
parent | 4ae328ecfafb98c34025d4962ec365579e373fd5 (diff) |
Always use the first value of the "interrupts" property the others do
not correspond to the PCI function.
Hopefully the first device that I find hitting this case is the second
bge(4) interface of my PowerMac11,2.
Diffstat (limited to 'sys/arch/macppc/pci')
-rw-r--r-- | sys/arch/macppc/pci/pci_machdep.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/arch/macppc/pci/pci_machdep.c b/sys/arch/macppc/pci/pci_machdep.c index 7936277a27b..fdb522ae2fc 100644 --- a/sys/arch/macppc/pci/pci_machdep.c +++ b/sys/arch/macppc/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.5 2015/02/09 23:37:16 mpi Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.6 2015/03/30 13:54:14 mpi Exp $ */ /* * Copyright (c) 2013 Martin Pieuchot @@ -156,7 +156,7 @@ pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) { struct ofw_pci_register reg; int node = PCITAG_NODE(pa->pa_tag); - int intr[4], nintr, len; + int intr[4], len; if (OF_getprop(node, "reg", ®, sizeof(reg)) < sizeof(reg)) return (ENODEV); @@ -170,14 +170,6 @@ pci_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) if (len < sizeof(intr[0])) return (ENODEV); - /* - * If we have multiple interrupts for a device, choose the one - * that corresponds to the PCI function. - */ - nintr = len / sizeof(intr[0]); - if (PCITAG_FUN(pa->pa_tag) < nintr) - intr[0] = intr[PCITAG_FUN(pa->pa_tag)]; - reg.size_hi = intr[0]; if (ofw_intr_map(OF_parent(node), (uint32_t *)®, intr)) { /* |