HomeFreeBSD

pci: Clear active PME# and disable PME# generation

Description

pci: Clear active PME# and disable PME# generation

The PCI power management specification requires that the OS clear any
pending PME# interrupt and generation of PME# interrupts during
"initial operating system load". Note that clearing a pending PME#
interrupt requires writing a 1 to the Read/Write-Clear PME bit in the
power management status register. To handle the boot time case, clear
PME# state in pci_read_cap() when scanning new PCI devices. This
should also cover hotplug devices.

In addition, clear this state on every PCI device after resume from
sleep in pci_resume_child before invoking the driver's DEVICE_RESUME
method.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D49222

(cherry picked from commit 82d692771239f1d156a875087dff4cf09f0e8b80)

Details

Provenance
jhbAuthored on Mar 27 2025, 8:53 PM
Reviewer
imp
Differential Revision
D49222: pci: Clear active PME# and disable PME# generation
Parents
rG6fb471682aa9: rwmlock/rwlock/sx: Print the pointer of destroyed locks in panic messages
Branches
Unknown
Tags
Unknown