git: fd2c8fe44cfa - stable/13 - iwlwifi: adjust the LinuxKPI pci return for now

From: Bjoern A. Zeeb <bz_at_FreeBSD.org>
Date: Sun, 27 Mar 2022 20:13:58 UTC
The branch stable/13 has been updated by bz:

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

commit fd2c8fe44cfae7ced0ae3d142038dc71e537dbd4
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2022-03-03 22:24:13 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2022-03-27 18:06:48 +0000

    iwlwifi: adjust the LinuxKPI pci return for now
    
    Rather than having LinuxKPI return BUS_PROBE_DEFAULT, return
    "one less" so that on conflict of IDs others would be preferred.
    
    This means that iwm(4) will attach instead of iwlwifi(4) for the
    chipsets iwm(4) supports and iwlwifi(4) only for the other--in iwm(4)
    unsupported--chipsets.  This is done so that we can enable auto-loading
    of drivers but for the upcoming 13.1-Release people with working iwm(4)
    will not yet be affected by iwlwifi(4).
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit 3d248a914d923b444f72fb27ba621c0ab2ef464e)
---
 sys/contrib/dev/iwlwifi/pcie/drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/contrib/dev/iwlwifi/pcie/drv.c b/sys/contrib/dev/iwlwifi/pcie/drv.c
index 58a7111d4f40..cd890fae6fbc 100644
--- a/sys/contrib/dev/iwlwifi/pcie/drv.c
+++ b/sys/contrib/dev/iwlwifi/pcie/drv.c
@@ -1746,6 +1746,10 @@ static struct pci_driver iwl_pci_driver = {
 	.probe = iwl_pci_probe,
 	.remove = iwl_pci_remove,
 	.driver.pm = IWL_PM_OPS,
+#if defined(__FreeBSD__)
+	/* Allow iwm(4) to attach for conflicting IDs for now. */
+	.bsd_probe_return = (BUS_PROBE_DEFAULT - 1),
+#endif
 };
 
 int __must_check iwl_pci_register_driver(void)