aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-15 04:19:56 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:13:03 -0500
commit63c2a0e598c2fa769a08a6e9ad124bf270b4436e (patch)
tree3e3a0c8a68221b4a76489ad595d0b886e2683dd9
parentab66a50e31deb48b0444c248e67e5aa3217efda5 (diff)
[SPARC64]: Fix pci_intmap_match().
When crawling up the PCI bus chain, stop at the first node that has an interrupt-map property before we hit the root. Also, if we use a bus interrupt-{map,mask} do not forget to update the 'intmask' pointer as we do for the 'intmap' pointer. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/pci_common.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c
index b2d21b11a232..ab6a2e1b76fb 100644
--- a/arch/sparc64/kernel/pci_common.c
+++ b/arch/sparc64/kernel/pci_common.c
@@ -581,18 +581,23 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
581 int plen; 581 int plen;
582 582
583 bus_dev = pdev->bus->self; 583 bus_dev = pdev->bus->self;
584 bus_pcp = bus_dev->sysdata;
584 regs_dev = pdev; 585 regs_dev = pdev;
586 regs_pcp = regs_dev->sysdata;
585 587
586 while (bus_dev->bus && 588 while (bus_dev->bus &&
587 bus_dev->bus->number != pbm->pci_first_busno) { 589 bus_dev->bus->number != pbm->pci_first_busno &&
590 prom_getproplen(bus_pcp->prom_node,
591 "interrupt-map") <= 0) {
588 regs_dev = bus_dev; 592 regs_dev = bus_dev;
593 regs_pcp = regs_dev->sysdata;
594
589 bus_dev = bus_dev->bus->self; 595 bus_dev = bus_dev->bus->self;
596 bus_pcp = bus_dev->sysdata;
590 } 597 }
591 598
592 regs_pcp = regs_dev->sysdata;
593 pregs = regs_pcp->prom_regs; 599 pregs = regs_pcp->prom_regs;
594 600
595 bus_pcp = bus_dev->sysdata;
596 601
597 /* But if the PCI bridge has it's own interrupt map 602 /* But if the PCI bridge has it's own interrupt map
598 * and mask properties, use that and the regs of the 603 * and mask properties, use that and the regs of the
@@ -616,6 +621,8 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
616 return 0; 621 return 0;
617 } 622 }
618 623
624 intmask = &bridge_local_intmask;
625
619 if (pdev->bus->self != bus_dev) 626 if (pdev->bus->self != bus_dev)
620 map_slot = 1; 627 map_slot = 1;
621 } else { 628 } else {