Date: Tue, 29 Apr 2025 18:30:50 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a2de254b2007 - stable/14 - acpi_pci: Use pci_has_pm and pci_clear_pme Message-ID: <202504291830.53TIUowr022978@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a2de254b2007856d987556102806dc7b5bb9729e commit a2de254b2007856d987556102806dc7b5bb9729e Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-03-27 20:56:08 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-04-29 14:45:14 +0000 acpi_pci: Use pci_has_pm and pci_clear_pme Differential Revision: https://reviews.freebsd.org/D49266 (cherry picked from commit 931baeb62b03029cb57459736851c4e8141e672e) --- sys/dev/acpica/acpi_pci.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/acpica/acpi_pci.c b/sys/dev/acpica/acpi_pci.c index b7a2bf70b4e0..646295f9eecc 100644 --- a/sys/dev/acpica/acpi_pci.c +++ b/sys/dev/acpica/acpi_pci.c @@ -391,8 +391,6 @@ acpi_pci_device_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) { device_t child, dev; ACPI_STATUS status; - int pmc; - uint16_t pmstat; int error; dev = context; @@ -419,12 +417,8 @@ acpi_pci_device_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context) 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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202504291830.53TIUowr022978>