summaryrefslogtreecommitdiffstats
path: root/sys/i386/pci
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-09-10 06:00:53 +0000
committerjhb <jhb@FreeBSD.org>2003-09-10 06:00:53 +0000
commitb45d8ce18f92c139dab3d8763facb7ba267503c5 (patch)
treee1bf18bcb34927a0fafcff1a133eba7595302941 /sys/i386/pci
parentf1adf3f35541fa8b3018f2d830c061eeef3e600b (diff)
downloadFreeBSD-src-b45d8ce18f92c139dab3d8763facb7ba267503c5.zip
FreeBSD-src-b45d8ce18f92c139dab3d8763facb7ba267503c5.tar.gz
We represent PCI intpin's two different ways. One is the way that the
intpin register is expressed in hardware where 0 means none, 1 means INTA, 2 INTB, etc. The other way is commonly used in loops where 0 means INTA, 1 means INTB, etc. The matchpin argument to pci_cfgintr_search() is supposed to be the first form, but we passsed in a loop index of the second. This fix adds one to the loop index to convert to the first form. Reported by: Pavlin Radoslavov <pavlin@icir.org>
Diffstat (limited to 'sys/i386/pci')
-rw-r--r--sys/i386/pci/pci_cfgreg.c2
-rw-r--r--sys/i386/pci/pci_pir.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index 220fbcb..77ff2d4 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.c
@@ -445,7 +445,7 @@ pci_cfgintr_linked(struct PIR_entry *pe, int pin)
* table entry
*/
irq = pci_cfgintr_search(pe, oe->pe_bus, oe->pe_device,
- j, pin);
+ j + 1, pin);
if (irq != PCI_INVALID_IRQ)
return(irq);
}
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c
index 220fbcb..77ff2d4 100644
--- a/sys/i386/pci/pci_pir.c
+++ b/sys/i386/pci/pci_pir.c
@@ -445,7 +445,7 @@ pci_cfgintr_linked(struct PIR_entry *pe, int pin)
* table entry
*/
irq = pci_cfgintr_search(pe, oe->pe_bus, oe->pe_device,
- j, pin);
+ j + 1, pin);
if (irq != PCI_INVALID_IRQ)
return(irq);
}
OpenPOWER on IntegriCloud