diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -391,8 +391,6 @@ { device_t child, dev; ACPI_STATUS status; - int pmc; - uint16_t pmstat; int error; dev = context; @@ -419,12 +417,8 @@ return; } if ((acpi_quirks & ACPI_Q_CLEAR_PME_ON_DETACH) && - (pci_find_cap(child, PCIY_PMG, &pmc) == 0)) { - pmstat = pci_read_config(child, pmc + PCIR_POWER_STATUS, 2); - pmstat &= ~PCIM_PSTAT_PMEENABLE; - pmstat |= PCIM_PSTAT_PME; - pci_write_config(child, pmc + PCIR_POWER_STATUS, pmstat, 2); - } + pci_has_pm(child)) + pci_clear_pme(child); status = acpi_SetInteger(h, "_EJ0", 1); if (ACPI_FAILURE(status)) { bus_topo_unlock();