aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2026-04-22 14:34:00 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2026-04-22 20:46:58 +0000
commit43b47418e769df02f43f2b4636dd5c7516fa51f8 (patch)
treed096b941b62f3e47d6ffb82cdad612741ae16468
parent9a2de1d2042d1c2730dd3049c26d481813b5f2bd (diff)
linuxkpi: Add `pci_dev_is_disconnected()`
For now, it is an empty stub that always return false. On Linux, it looks at an internal error state of the device to determine if it is disconnected. The amdgpu DRM driver started this in Linux 6.12.x. Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56582
-rw-r--r--sys/compat/linuxkpi/common/include/linux/pci.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
index ba68a9ee0dc3..5cd87ff091bc 100644
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -1333,6 +1333,13 @@ pci_dev_present(const struct pci_device_id *cur)
return (0);
}
+static inline bool
+pci_dev_is_disconnected(const struct pci_dev *pdev)
+{
+ pr_debug("TODO: %s\n", __func__);
+ return (false);
+}
+
static inline const struct pci_device_id *
pci_match_id(const struct pci_device_id *ids, struct pci_dev *pdev)
{