diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2002-05-29 16:16:16 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2002-05-29 16:16:16 +0000 |
| commit | 26722a1909874e367274dc3f51781fcf2583562d (patch) | |
| tree | 8c51af2cacee6ace0616f5e42cf6710d8d482383 | |
| parent | 165aadc593078c0a11014dac09713aa3225409a4 (diff) | |
Notes
| -rw-r--r-- | sys/amd64/pci/pci_cfgreg.c | 8 | ||||
| -rw-r--r-- | sys/i386/pci/pci_cfgreg.c | 8 | ||||
| -rw-r--r-- | sys/i386/pci/pci_pir.c | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/sys/amd64/pci/pci_cfgreg.c b/sys/amd64/pci/pci_cfgreg.c index 27c89127f681..5b8bf9b64586 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 27c89127f681..5b8bf9b64586 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 27c89127f681..5b8bf9b64586 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, |
