acpidev_pci.c revision a31148363f598def767ac48c5d82e1572e44b935
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * CDDL HEADER START
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * The contents of this file are subject to the terms of the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Common Development and Distribution License (the "License").
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * You may not use this file except in compliance with the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * See the License for the specific language governing permissions
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * and limitations under the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * When distributing Covered Code, include this CDDL HEADER in each
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * If applicable, add the following below this CDDL HEADER, with the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * fields enclosed by brackets "[]" replaced with your own identifying
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * information: Portions Copyright [yyyy] [name of copyright owner]
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * CDDL HEADER END
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Copyright (c) 2010, Intel Corporation.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * All rights reserved.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liustatic ACPI_STATUS acpidev_pci_probe(acpidev_walk_info_t *infop);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Default class driver for PCI/PCIEX Host Bridge devices.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu 0, /* adc_refcnt */
a31148363f598def767ac48c5d82e1572e44b935Gerry Liustatic char *acpidev_pci_device_ids[] = {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liustatic char *acpidev_pciex_device_ids[] = {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liuacpidev_pci_update_status(acpidev_walk_info_t *infop)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu ASSERT((dhdl->aod_iflag & ACPIDEV_ODF_DEVINFO_CREATED) == 0);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu ASSERT((dhdl->aod_iflag & ACPIDEV_ODF_DEVINFO_TAGGED) == 0);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if ((dhdl->aod_iflag & ACPIDEV_ODF_STATUS_VALID) == 0) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu status = acpidev_query_device_status(infop->awi_hdl);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if (ACPI_FAILURE(acpica_get_devinfo(infop->awi_hdl, &dip))) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Mark the device as DISABLE if no device node created.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * BIOS may hide some special PCI/PCIex buses from OS.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu ACPIDEV_ARRAY_PARAM(acpidev_pci_device_ids)) == B_FALSE) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if (acpica_get_devcfg_feature(ACPI_DEVCFG_PCI) == 0) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if (infop->awi_op_type == ACPIDEV_OP_BOOT_PROBE) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Check hotplug capability on the first pass.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu } else if (infop->awi_op_type == ACPIDEV_OP_BOOT_REPROBE) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Check whether the PCI device enumerator has created device
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * nodes for PCI/PCIEX host bridges.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu } else if (infop->awi_op_type == ACPIDEV_OP_HOTPLUG_PROBE) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * No support of PCI/PCIEX host bridge hotplug yet.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * It will come in next phase.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu "!acpidev: no support of PCI/PCIEX host bridge hotplug.");
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Don't block the hot-adding process, just skip it.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu ACPIDEV_DEBUG(CE_WARN, "!acpidev: unknown operation type %u "
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if (ACPI_FAILURE(rc) && rc != AE_NOT_EXIST && rc != AE_ALREADY_EXISTS) {