- Quiet the pci_link(4) devices so that they don't show up in dmesg now.

- Improve panic message if we fail to read the PCI bus number from a bridge
  device.
- Don't try to lookup a BIOS IRQ for a link unless the link is routed via
  an ISA IRQ since BIOSen currently only route PCI link devices via ISA
  IRQs.

Tested by:	Mathieu Prevot bsdhack at club-internet dot fr
MFC after:	1 week
This commit is contained in:
jhb 2005-11-23 16:36:13 +00:00
parent 5e1264a066
commit 1d59f819d8

View File

@ -159,6 +159,7 @@ acpi_pci_link_probe(device_t dev)
device_set_desc_copy(dev, descr);
} else
device_set_desc(dev, "ACPI PCI Link");
device_quiet(dev);
return (0);
}
@ -618,7 +619,7 @@ acpi_pci_link_add_reference(device_t dev, int index, device_t pcib, int slot,
*/
if (BUS_READ_IVAR(pcib, NULL, PCIB_IVAR_BUS, &bus) != 0) {
device_printf(pcib, "Unable to read PCI bus number");
panic("this is bad");
panic("PCI bridge without a bus number");
}
/* Bump the reference count. */
@ -630,6 +631,26 @@ acpi_pci_link_add_reference(device_t dev, int index, device_t pcib, int slot,
if (link->l_routed)
pci_link_interrupt_weights[link->l_irq]++;
/*
* The BIOS only routes interrupts via ISA IRQs using the ATPICs
* (8259As). Thus, if this link is routed via an ISA IRQ, go
* look to see if the BIOS routed an IRQ for this link at the
* indicated (bus, slot, pin). If so, we prefer that IRQ for
* this link and add that IRQ to our list of known-good IRQs.
* This provides a good work-around for link devices whose _CRS
* method is either broken or bogus. We only use the value
* returned by _CRS if we can't find a valid IRQ via this method
* in fact.
*
* If this link is not routed via an ISA IRQ (because we are using
* APIC for example), then don't bother looking up the BIOS IRQ
* as if we find one it won't be valid anyway.
*/
if (!link->l_isa_irq) {
ACPI_SERIAL_END(pci_link);
return;
}
/* Try to find a BIOS IRQ setting from any matching devices. */
bios_irq = acpi_pci_link_search_irq(bus, slot, pin);
if (!PCI_INTERRUPT_VALID(bios_irq)) {