From donotreplytothismail at gmx.com Wed Oct 24 13:19:13 2018 From: donotreplytothismail at gmx.com (Mark Chen) Date: 24 Oct 2018 20:09:22 +0800 Subject: Satellite Broadband Internet Modem IP freebsd-new-bus@freebsd.org Message-ID: <700DEFCE-97FD-4BD5-8643-6383A3DBAAF9@SUNSTUDIO> From jhb at FreeBSD.org Wed Oct 24 17:31:55 2018 From: jhb at FreeBSD.org (John Baldwin) Date: Wed, 24 Oct 2018 10:31:48 -0700 Subject: Where are bus passes with lower than default pass value called? In-Reply-To: References: Message-ID: On 5/28/18 3:16 AM, Jan Mazur wrote: > Here: http://bxr.su/FreeBSD/sys/kern/subr_bus.c#901 > bus_current_pass is set to BUS_PASS_ROOT. > > AFAIK autoconfiguration starts here: > http://bxr.su/FreeBSD/sys/mips/mips/autoconf.c#95 and later it > calls BUS_NEW_PASS(root_bus) which calls bus_set_pass(BUS_PASS_DEFAULT). > Why is it called with maximum possible bus pass level - BUS_PASS_DEFAULT? > Where are bus passes with lower pass value called? bus_set_pass() walks up from the current bus pass to the requested bus pass stopping at each level that has a registered driver. The intention is that eventually we may want to insert SYSINITs in between some of the passes in which case a SYSINIT would use bus_set_pass with a lower level and then do some other work, but currently we don't have any of those, so we are still just passing through all the levels in one SYSINIT. -- John Baldwin