summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-10-27 14:54:43 +0000
committerjhb <jhb@FreeBSD.org>2007-10-27 14:54:43 +0000
commit495c2542d038bb36a00e590079819060fdfe3ccc (patch)
tree930e3c915967fea6f179fdb02fec0f9c14130ea2 /sys
parente64911f0f40767d5da9f79dd5ef4d8c4b5609839 (diff)
downloadFreeBSD-src-495c2542d038bb36a00e590079819060fdfe3ccc.zip
FreeBSD-src-495c2542d038bb36a00e590079819060fdfe3ccc.tar.gz
Don't destroy an ACPI device_t for a PCI device and reassign the ACPI
handle to the PCI device_t if the ACPI device_t is already attached to a driver. This happens on the Tablet TC1000 which for some reason includes two PCI-ISA bridges and treats the second bridge as an ACPI system resource device. Reviewed by: njl (a while ago) MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi_pci.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c
index ed22417..607691c 100644
--- a/sys/dev/acpica/acpi_pci.c
+++ b/sys/dev/acpica/acpi_pci.c
@@ -208,8 +208,19 @@ acpi_pci_update_device(ACPI_HANDLE handle, device_t pci_child)
*/
child = acpi_get_device(handle);
if (child != NULL) {
- KASSERT(!device_is_alive(child), ("%s: deleting alive child %s",
- __func__, device_get_nameunit(child)));
+ if (device_is_alive(child)) {
+ /*
+ * The TabletPC TC1000 has a second PCI-ISA bridge
+ * that has a _HID for an acpi_sysresource device.
+ * In that case, leave ACPI-CA's device data pointing
+ * at the ACPI-enumerated device.
+ */
+ device_printf(child,
+ "Conflicts with PCI device %d:%d:%d\n",
+ pci_get_bus(pci_child), pci_get_slot(pci_child),
+ pci_get_function(pci_child));
+ return;
+ }
KASSERT(device_get_parent(child) ==
devclass_get_device(devclass_find("acpi"), 0),
("%s: child (%s)'s parent is not acpi0", __func__,
OpenPOWER on IntegriCloud