summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-11-23 16:36:13 +0000
committerjhb <jhb@FreeBSD.org>2005-11-23 16:36:13 +0000
commit1d59f819d850a9100db7f0a97ad424e877bc1a5d (patch)
tree556b3863f270fb3438a2b52192e44d10b81af24c /sys/dev
parent5e1264a066b1d1015c2ebe44666ad84afa626002 (diff)
downloadFreeBSD-src-1d59f819d850a9100db7f0a97ad424e877bc1a5d.zip
FreeBSD-src-1d59f819d850a9100db7f0a97ad424e877bc1a5d.tar.gz
- 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
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_pci_link.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_pci_link.c b/sys/dev/acpica/acpi_pci_link.c
index 57d27f7..5b73edb 100644
--- a/sys/dev/acpica/acpi_pci_link.c
+++ b/sys/dev/acpica/acpi_pci_link.c
@@ -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)) {
OpenPOWER on IntegriCloud