Don't claim to have routed an interrupt when the method actually returned an

error.
This commit is contained in:
Mike Smith 2002-02-12 01:28:49 +00:00
parent 0483b1a8f2
commit 8046c4b998
2 changed files with 9 additions and 2 deletions

View File

@ -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);
}

View File

@ -245,6 +245,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.
*