diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-05-18 18:44:00 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-05-18 18:44:00 +0000 |
| commit | 6a043d0814a29e756f5d26e7b59a360e1d6dfa45 (patch) | |
| tree | 49da4f6c74b59a31745fd57073e445fedd5691e0 | |
| parent | 701d7be6e4a9a145700fdee5c038470b355a0e05 (diff) | |
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
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h | 4 |
1 files 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_t |
