opnsense-src/sys/dev/cardbus
John Baldwin b5bc47f1e1 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)
2025-04-29 10:44:25 -04:00
..
card_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
cardbus.c pci: Clear active PME# and disable PME# generation 2025-04-29 10:44:25 -04:00
cardbus_cis.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
cardbus_cis.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
cardbus_device.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
cardbusreg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
cardbusvar.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
power_if.m sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00