From b45d8ce18f92c139dab3d8763facb7ba267503c5 Mon Sep 17 00:00:00 2001 From: jhb Date: Wed, 10 Sep 2003 06:00:53 +0000 Subject: 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 --- sys/i386/pci/pci_cfgreg.c | 2 +- sys/i386/pci/pci_pir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/i386/pci') 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); } -- cgit v1.1