summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2002-05-29 16:16:16 +0000
committerbrooks <brooks@FreeBSD.org>2002-05-29 16:16:16 +0000
commit4432c323fd2f1885e9f765de0d157f9dc2286b26 (patch)
tree8c51af2cacee6ace0616f5e42cf6710d8d482383
parent48bc02848a5c3829df49d7ac9397887335e3333d (diff)
downloadFreeBSD-src-4432c323fd2f1885e9f765de0d157f9dc2286b26.zip
FreeBSD-src-4432c323fd2f1885e9f765de0d157f9dc2286b26.tar.gz
Restore the irq=0 => irq=255 hack to pci_cfgintr_search(). Just having
it in pci_cfgregread() wasn't sufficent on at least the HP Omnibook 500. Reviewed by: imp
-rw-r--r--sys/amd64/pci/pci_cfgreg.c8
-rw-r--r--sys/i386/pci/pci_cfgreg.c8
-rw-r--r--sys/i386/pci/pci_pir.c8
3 files changed, 24 insertions, 0 deletions
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c
index 27c8912..5b8bf9b 100644
--- a/sys/amd64/pci/pci_cfgreg.c
+++ b/sys/amd64/pci/pci_cfgreg.c
@@ -408,6 +408,14 @@ pci_cfgintr_search(struct PIR_entry *pe, int bus, int device, int matchpin, int
(pci_get_slot(*childp) == device) &&
(pci_get_intpin(*childp) == matchpin)) {
irq = pci_get_irq(*childp);
+ /*
+ * Some BIOS writers seem to want to ignore the spec and put
+ * 0 in the intline rather than 255 to indicate none. Once
+ * we've found one that matches, we break because there can
+ * be no others (which is why test looks a little odd).
+ */
+ if (irq == 0)
+ irq = 255;
if (irq != 255)
PRVERB(("pci_cfgintr_search: linked (%x) to configured irq %d at %d:%d:%d\n",
pe->pe_intpin[pin - 1].link, irq,
diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c
index 27c8912..5b8bf9b 100644
--- a/sys/i386/pci/pci_cfgreg.c
+++ b/sys/i386/pci/pci_cfgreg.c
@@ -408,6 +408,14 @@ pci_cfgintr_search(struct PIR_entry *pe, int bus, int device, int matchpin, int
(pci_get_slot(*childp) == device) &&
(pci_get_intpin(*childp) == matchpin)) {
irq = pci_get_irq(*childp);
+ /*
+ * Some BIOS writers seem to want to ignore the spec and put
+ * 0 in the intline rather than 255 to indicate none. Once
+ * we've found one that matches, we break because there can
+ * be no others (which is why test looks a little odd).
+ */
+ if (irq == 0)
+ irq = 255;
if (irq != 255)
PRVERB(("pci_cfgintr_search: linked (%x) to configured irq %d at %d:%d:%d\n",
pe->pe_intpin[pin - 1].link, irq,
diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c
index 27c8912..5b8bf9b 100644
--- a/sys/i386/pci/pci_pir.c
+++ b/sys/i386/pci/pci_pir.c
@@ -408,6 +408,14 @@ pci_cfgintr_search(struct PIR_entry *pe, int bus, int device, int matchpin, int
(pci_get_slot(*childp) == device) &&
(pci_get_intpin(*childp) == matchpin)) {
irq = pci_get_irq(*childp);
+ /*
+ * Some BIOS writers seem to want to ignore the spec and put
+ * 0 in the intline rather than 255 to indicate none. Once
+ * we've found one that matches, we break because there can
+ * be no others (which is why test looks a little odd).
+ */
+ if (irq == 0)
+ irq = 255;
if (irq != 255)
PRVERB(("pci_cfgintr_search: linked (%x) to configured irq %d at %d:%d:%d\n",
pe->pe_intpin[pin - 1].link, irq,
OpenPOWER on IntegriCloud