From owner-freebsd-new-bus@freebsd.org Wed Oct 24 13:19:13 2018 Return-Path: Delivered-To: freebsd-new-bus@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A5AD107C35D for ; Wed, 24 Oct 2018 13:19:13 +0000 (UTC) (envelope-from donotreplytothismail@gmx.com) Received: from SUNSTUDIO (li1865-135.members.linode.com [172.105.211.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 274668ACA9 for ; Wed, 24 Oct 2018 13:19:11 +0000 (UTC) (envelope-from donotreplytothismail@gmx.com) Message-ID: <700DEFCE-97FD-4BD5-8643-6383A3DBAAF9@SUNSTUDIO> From: "Mark Chen" (Mark Chen) To: freebsd-new-bus@freebsd.org Subject: RE: Satellite Broadband Internet Modem IP freebsd-new-bus@freebsd.org Date: 24 Oct 2018 20:09:22 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 13:19:13 -0000 From owner-freebsd-new-bus@freebsd.org Wed Oct 24 17:31:55 2018 Return-Path: Delivered-To: freebsd-new-bus@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE9BCFFE5ED for ; Wed, 24 Oct 2018 17:31:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75ED470533 for ; Wed, 24 Oct 2018 17:31:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id D14D310B670; Wed, 24 Oct 2018 13:31:48 -0400 (EDT) Subject: Re: Where are bus passes with lower than default pass value called? To: Jan Mazur , freebsd-new-bus@freebsd.org References: Cc: Wojciech Moczulski From: John Baldwin Message-ID: Date: Wed, 24 Oct 2018 10:31:48 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 24 Oct 2018 13:31:49 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: freebsd-new-bus@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD's new-bus architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Oct 2018 17:31:55 -0000 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