Created attachment 197394 [details] add MODULE_PNP_INFO() to iwm(4) Provide MODULE_PNP_INFO() for iwm(4). The added vendor field is redundant and useless, but looks like there's no other way. Tested that if_iwm.ko and iwm8265fw.ko were autoloaded on boot for "iwm0: <Intel(R) Dual Band Wireless AC 8265> mem 0xecd00000-0xecd01fff at device 0.0 on pci3".
Created attachment 197497 [details] add MODULE_PNP_INFO() to iwm(4) I was spoon-fed the 'T' descriptor, which makes this really simple.
A commit references this bug: Author: bz Date: Sat Sep 29 21:14:54 UTC 2018 New revision: 339020 URL: https://svnweb.freebsd.org/changeset/base/339020 Log: Provide MODULE_PNP_INFO() for iwm(4) so that devmatch(8) can do its job. PR: 231625 Submitted by: Yuri Pankov (yuripv yuripv.net) Approved by: re (kib) Changes: head/sys/dev/iwm/if_iwm.c
It seems most MODULE_PNP_INFO() was never MFCed to 11. I'll close this and can MFC when all the other gets merged as well (note: different syntax as of a few days ago)
Committed change seems to differ from what was in the patch, specifically it doesn't match the prototype described in MODULE_PNP_INFO(9), where second argument is a bus name. Was the change intentional?
(In reply to Yuri Pankov from comment #4) No, I had to edit out sizeof(iwm_devices[0]) and screwed up when moving things to the machine to commit. Sigh. Let me get this sorted right away. Can you confirm that this fix will be right? Index: sys/dev/iwm/if_iwm.c =================================================================== --- sys/dev/iwm/if_iwm.c (revision 339020) +++ sys/dev/iwm/if_iwm.c (working copy) @@ -6460,7 +6460,7 @@ static driver_t iwm_pci_driver = { static devclass_t iwm_devclass; DRIVER_MODULE(iwm, pci, iwm_pci_driver, iwm_devclass, NULL, NULL); -MODULE_PNP_INFO("U16:device;P:#;T:vendor=0x8086", iwm_pci_driver, iwm, +MODULE_PNP_INFO("U16:device;P:#;T:vendor=0x8086", pci, iwm_pci_driver, iwm_devices, nitems(iwm_devices)); MODULE_DEPEND(iwm, firmware, 1, 1, 1); MODULE_DEPEND(iwm, pci, 1, 1, 1);
Yes, this looks correct, thank you.
Oh, sorry, just woke up, the new line should read: MODULE_PNP_INFO("U16:device;P:#;T:vendor=0x8086", pci, iwm_pci_driver, iwm_devices, sizeof(iwm_devices[0]), nitems(iwm_devices));
(In reply to Yuri Pankov from comment #7) That one's wrong -- "sizeof(iwm_devices[0])" parameter is removed after r338948.
(I think comment #5 is correct.)
Yes, you and Bjoern are correct, sorry I missed the change. And the diff in comment #5 is correct as well.
A commit references this bug: Author: bz Date: Mon Oct 1 10:44:34 UTC 2018 New revision: 339038 URL: https://svnweb.freebsd.org/changeset/base/339038 Log: Fix the MODULE_PNP_INFO() for iwm(4) where I got the bus and module arguments wrong in r339020. PR: 231625 Reported by: Yuri Pankov (yuripv yuripv.net) Reviewed by: cem, Yuri Pankov (yuripv yuripv.net) Approved by: re (kib) Pointyhat to: bz (a rather big one for this one) Changes: head/sys/dev/iwm/if_iwm.c
Close this, take #2