diff options
| author | Mike Smith <msmith@FreeBSD.org> | 2002-02-12 01:28:49 +0000 |
|---|---|---|
| committer | Mike Smith <msmith@FreeBSD.org> | 2002-02-12 01:28:49 +0000 |
| commit | 8046c4b99898ba8ea33f2b2e9a596f628457fd7b (patch) | |
| tree | a9471a2bf344ae1f66ed26f8f2bc9b714e56baa9 /sys/dev | |
| parent | 0483b1a8f2e96190de86c77b8dd3c2878eaba090 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/pci_pci.c | 6 | ||||
| -rw-r--r-- | sys/dev/pci/pcivar.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 9c1de44f88be0..8b5eef5eddd1b 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -409,7 +409,9 @@ pcib_route_interrupt(device_t pcib, device_t dev, int pin) */ bus = device_get_parent(pcib); intnum = PCIB_ROUTE_INTERRUPT(device_get_parent(bus), pcib, parent_intpin + 1); - device_printf(pcib, "routed slot %d INT%c to irq %d\n", pci_get_slot(dev), - 'A' + pin - 1, intnum); + if (PCI_INTERRUPT_VALID(intnum)) { + device_printf(pcib, "routed slot %d INT%c to irq %d\n", pci_get_slot(dev), + 'A' + pin - 1, intnum); + } return(intnum); } diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 432f885d9caa2..0b8cf1495447a 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -246,6 +246,11 @@ PCIB_ACCESSOR(bus, BUS, u_int32_t) #undef PCIB_ACCESSOR /* + * PCI interrupt validation. + */ +#define PCI_INTERRUPT_VALID(x) (((x) != 0) && ((x) != 255)) + +/* * Convenience functions. * * These should be used in preference to manually manipulating |
