From af19988f6cd3918fd222003540769a38abb63174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Date: Mon, 20 Feb 2023 21:46:38 +0100 Subject: [PATCH] linuxkpi: Define `pcie_aspm_enabled()` This is not the same as querying the PCIE ASPM capability. The function should return if the feature is actually enabled or not. It always return false on FreeBSD. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D39053 --- sys/compat/linuxkpi/common/include/linux/pci.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index c9ebdf54669..2c222bf1cdb 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -1370,6 +1370,12 @@ pcie_bandwidth_available(struct pci_dev *pdev, return (nwidth * PCIE_SPEED2MBS_ENC(nspeed)); } +static inline bool +pcie_aspm_enabled(struct pci_dev *pdev) +{ + return (false); +} + static inline struct pci_dev * pcie_find_root_port(struct pci_dev *pdev) {