Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2025 07:53:12 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 885e8f272f75 - main - LinuxKPI: add skeleton pci_enable_wake()
Message-ID:  <202510210753.59L7rC0f014520@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=885e8f272f7515b0325974de72d18b73318eff07

commit 885e8f272f7515b0325974de72d18b73318eff07
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-10-17 20:38:11 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-10-21 07:49:39 +0000

    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.
    
    MFC after:      3 days
    Reviewed by:    dumbbell
    Differential Revision: https://reviews.freebsd.org/D53208
---
 sys/compat/linuxkpi/common/include/linux/pci.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
index ffc2be600c22..06336bf963d6 100644
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -831,6 +831,19 @@ lkpi_pci_restore_state(struct pci_dev *pdev)
 #define pci_save_state(dev)	lkpi_pci_save_state(dev)
 #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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202510210753.59L7rC0f014520>