diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2025-10-17 20:38:11 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-01-16 19:37:52 +0000 |
| commit | 1f9ca940c1ba1e27b3dbd62d8dd6384cd7c4c8c1 (patch) | |
| tree | 465d8a95d63390ebc2ea02fd48b52bd43f454eb5 | |
| parent | 6248a65545474b0e534ddcf97959205f133ac2de (diff) | |
LinuxKPI: add skeleton pci_enable_wake()
Given we do not yet support "wake" bits in device there is little need
doing it in PCI if we cannot check if we are supposed to do the
operation in first place. Once we would implement this, we would need
to also do the appropriate PCI (pme) checks before enabling (disabling)
it.
Reviewed by: dumbbell
Differential Revision: https://reviews.freebsd.org/D53208
(cherry picked from commit 885e8f272f7515b0325974de72d18b73318eff07)
(cherry picked from commit be52a81be07997f84f454637372a056415f6a2eb)
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index da0a713dbee8..381ad65febe5 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -811,6 +811,19 @@ lkpi_pci_restore_state(struct pci_dev *pdev) #define pci_restore_state(dev) lkpi_pci_restore_state(dev) static inline int +linuxkpi_pci_enable_wake(struct pci_dev *pdev, pci_power_t state, bool ena) +{ + /* + * We do not currently support this in device.h either to + * check if the device is allowed to wake up in first place. + */ + pr_debug("%s: TODO\n", __func__); + return (0); +} +#define pci_enable_wake(dev, state, ena) \ + linuxkpi_pci_enable_wake(dev, state, ena) + +static inline int pci_reset_function(struct pci_dev *pdev) { |
