Date: Mon, 18 May 2026 18:53:29 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 6a043d0814a2 - main - LinuxKPI: Check the devclass of the parent device in dev_is_pci Message-ID: <6a0b6029.273ea.2891f776@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6a043d0814a29e756f5d26e7b59a360e1d6dfa45 commit 6a043d0814a29e756f5d26e7b59a360e1d6dfa45 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-05-18 18:44:00 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-05-18 18:44:00 +0000 LinuxKPI: Check the devclass of the parent device in dev_is_pci Reviewed by: bz Fixes: c41d83548b6c ("LinuxKPI: pci.h add more defines and functions") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57066 --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 5cd87ff091bc..a6ddc02d1947 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -399,8 +399,8 @@ int _lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec); static inline bool dev_is_pci(struct device *dev) { - - return (device_get_devclass(dev->bsddev) == devclass_find("pci")); + return (device_get_devclass(device_get_parent(dev->bsddev)) == + devclass_find("pci")); } static inline uint16_thome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a0b6029.273ea.2891f776>
