Date: Mon, 29 Jun 2026 06:34:10 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a792bb723609 - stable/15 - LinuxKPI: 802.11 suspend/resume: fix the is_pci_dev check Message-ID: <6a4211e2.46744.109b642a@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a792bb723609c27857c8b7a267bd145617ece84e commit a792bb723609c27857c8b7a267bd145617ece84e Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2026-05-30 21:33:51 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-06-29 03:50:03 +0000 LinuxKPI: 802.11 suspend/resume: fix the is_pci_dev check Shortly before I committed the works from a year ago, jhb added a function ("is_pci_device") so that the check against the devclass does not have to be coded in every driver. Use this instead in main (and stable/15 in case the works get MFCed). At the same time this fixes the check (the old one was wrong) as we attach to the LinuxKPI 802.11 driver, e.g., iwlwifi and thus we need to check the parent of the parent and not just the parent to be of the devclass "pci" in the identify bus function. The was the first error. The second was (and this is why it worked) that we checked for == instead of != and so the wrong check became true again. Discussed with: jhb Fixes: 11d69a4558de ("LinuxKPI: 802.11: add support for s/r") Sponsored by: The FreeBSD Foundation (cherry picked from commit d07460f194835410b6a0e99af6b9721b872fb009) --- sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c index c69288bd5886..cf9384bf53f2 100644 --- a/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c +++ b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c @@ -13,6 +13,7 @@ #include <sys/module.h> #include <linux/pci.h> +#include <dev/pci/pcivar.h> #include "linux_80211.h" #include <net80211/ieee80211_var.h> @@ -139,7 +140,7 @@ lkpi_80211_pm_identify(driver_t *driver, device_t parent) return; /* Make sure this is PCI for now. */ - if (device_get_devclass(parent) == devclass_find("pci")) + if (!is_pci_device(parent)) return; if (BUS_ADD_CHILD(parent, 0, driver->name, DEVICE_UNIT_ANY) == NULL)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a4211e2.46744.109b642a>
