The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=4b64193bed12f604c1aba348472c98f7f8e64316
commit 4b64193bed12f604c1aba348472c98f7f8e64316 Author: Kornel Duleba <min...@semihalf.com> AuthorDate: 2021-08-05 12:09:08 +0000 Commit: Marcin Wojtas <m...@freebsd.org> CommitDate: 2021-08-08 20:27:15 +0000 enetc: Force correct order with DRIVER_MODULE_ORDERED The toolchain can reorder symbols, meaning that changing the order of DRIVER_MODULE macros is not enough to ensure that miibus gets registered first. Use DRIVER_MODULE_ORDERED instead to fix the problem properly. Fixes: 5ad6d28cbe6b ("enetc: Support building the driver as a loadable module.") Reported by: jhb --- sys/dev/enetc/if_enetc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/enetc/if_enetc.c b/sys/dev/enetc/if_enetc.c index 46327eb419bf..2a72f807acd7 100644 --- a/sys/dev/enetc/if_enetc.c +++ b/sys/dev/enetc/if_enetc.c @@ -159,7 +159,9 @@ static driver_t enetc_driver = { static devclass_t enetc_devclass; DRIVER_MODULE(miibus, enetc, miibus_driver, miibus_devclass, NULL, NULL); -DRIVER_MODULE(enetc, pci, enetc_driver, enetc_devclass, NULL, NULL); +/* Make sure miibus gets procesed first. */ +DRIVER_MODULE_ORDERED(enetc, pci, enetc_driver, enetc_devclass, NULL, NULL, + SI_ORDER_ANY); MODULE_VERSION(enetc, 1); IFLIB_PNP_INFO(pci, enetc, enetc_vendor_info_array); _______________________________________________ dev-commits-src-main@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main To unsubscribe, send any mail to "dev-commits-src-main-unsubscr...@freebsd.org"