Commit 63c2a0e5 authored by David S. Miller's avatar David S. Miller

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent ab66a50e
...@@ -581,18 +581,23 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt ...@@ -581,18 +581,23 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
int plen; int plen;
bus_dev = pdev->bus->self; bus_dev = pdev->bus->self;
bus_pcp = bus_dev->sysdata;
regs_dev = pdev; regs_dev = pdev;
regs_pcp = regs_dev->sysdata;
while (bus_dev->bus && while (bus_dev->bus &&
bus_dev->bus->number != pbm->pci_first_busno) { bus_dev->bus->number != pbm->pci_first_busno &&
prom_getproplen(bus_pcp->prom_node,
"interrupt-map") <= 0) {
regs_dev = bus_dev; regs_dev = bus_dev;
regs_pcp = regs_dev->sysdata;
bus_dev = bus_dev->bus->self; bus_dev = bus_dev->bus->self;
bus_pcp = bus_dev->sysdata;
} }
regs_pcp = regs_dev->sysdata;
pregs = regs_pcp->prom_regs; pregs = regs_pcp->prom_regs;
bus_pcp = bus_dev->sysdata;
/* But if the PCI bridge has it's own interrupt map /* But if the PCI bridge has it's own interrupt map
* and mask properties, use that and the regs of the * 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,6 +621,8 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt
return 0; return 0;
} }
intmask = &bridge_local_intmask;
if (pdev->bus->self != bus_dev) if (pdev->bus->self != bus_dev)
map_slot = 1; map_slot = 1;
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment