diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-02-17 11:20:18 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:23 -0500 |
commit | 101d5c18a928ef82b6c7bf99a9eaa536b5ccf593 (patch) | |
tree | 340b5fa064fcf8a62a0742f8fb46fa4bb61abf8d /arch/sparc64/kernel/pci_common.c | |
parent | 72aff53f1fe74153eccef303ab2f79de888d248c (diff) |
[SPARC64]: Fix PCI IRQ probing regression.
If the top-level cnode had multi entries in it's "reg"
property, we'd fail. The buffer wasn't large enough in
such cases.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/pci_common.c')
-rw-r--r-- | arch/sparc64/kernel/pci_common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/sparc64/kernel/pci_common.c b/arch/sparc64/kernel/pci_common.c index f9101966a746..1448294a2379 100644 --- a/arch/sparc64/kernel/pci_common.c +++ b/arch/sparc64/kernel/pci_common.c | |||
@@ -675,7 +675,7 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt | |||
675 | { | 675 | { |
676 | struct pcidev_cookie *dev_pcp = pdev->sysdata; | 676 | struct pcidev_cookie *dev_pcp = pdev->sysdata; |
677 | struct pci_pbm_info *pbm = dev_pcp->pbm; | 677 | struct pci_pbm_info *pbm = dev_pcp->pbm; |
678 | struct linux_prom_pci_registers reg; | 678 | struct linux_prom_pci_registers reg[PROMREG_MAX]; |
679 | unsigned int hi, mid, lo, irq; | 679 | unsigned int hi, mid, lo, irq; |
680 | int i, cnode, plen; | 680 | int i, cnode, plen; |
681 | 681 | ||
@@ -683,7 +683,7 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt | |||
683 | if (cnode == pbm->prom_node) | 683 | if (cnode == pbm->prom_node) |
684 | goto success; | 684 | goto success; |
685 | 685 | ||
686 | plen = prom_getproperty(cnode, "reg", (char *) ®, sizeof(reg)); | 686 | plen = prom_getproperty(cnode, "reg", (char *) reg, sizeof(reg)); |
687 | if (plen <= 0 || | 687 | if (plen <= 0 || |
688 | (plen % sizeof(struct linux_prom_pci_registers)) != 0) { | 688 | (plen % sizeof(struct linux_prom_pci_registers)) != 0) { |
689 | printk("%s: OBP node %x reg property has bad len %d\n", | 689 | printk("%s: OBP node %x reg property has bad len %d\n", |
@@ -691,9 +691,9 @@ static int __init pci_intmap_match(struct pci_dev *pdev, unsigned int *interrupt | |||
691 | goto fail; | 691 | goto fail; |
692 | } | 692 | } |
693 | 693 | ||
694 | hi = reg.phys_hi & pbm->pbm_intmask.phys_hi; | 694 | hi = reg[0].phys_hi & pbm->pbm_intmask.phys_hi; |
695 | mid = reg.phys_mid & pbm->pbm_intmask.phys_mid; | 695 | mid = reg[0].phys_mid & pbm->pbm_intmask.phys_mid; |
696 | lo = reg.phys_lo & pbm->pbm_intmask.phys_lo; | 696 | lo = reg[0].phys_lo & pbm->pbm_intmask.phys_lo; |
697 | irq = *interrupt & pbm->pbm_intmask.interrupt; | 697 | irq = *interrupt & pbm->pbm_intmask.interrupt; |
698 | 698 | ||
699 | for (i = 0; i < pbm->num_pbm_intmap; i++) { | 699 | for (i = 0; i < pbm->num_pbm_intmap; i++) { |