From owner-freebsd-current@FreeBSD.ORG Tue Jan 4 22:17:54 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A67116A4CE for ; Tue, 4 Jan 2005 22:17:54 +0000 (GMT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50CA643D1F for ; Tue, 4 Jan 2005 22:17:53 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j04MEboO041451 for current@freebsd.org.checked; Wed, 5 Jan 2005 01:14:37 +0300 (MSK) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j04MENTS041437; Wed, 5 Jan 2005 01:14:23 +0300 (MSK) (envelope-from rik@cronyx.ru) Message-ID: <41DB1310.4060807@cronyx.ru> Date: Wed, 05 Jan 2005 01:05:04 +0300 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Maksim Yevmenkin References: <41DB08B9.6090801@savvis.net> In-Reply-To: <41DB08B9.6090801@savvis.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org cc: Julian Elischer Subject: Re: netgraph(3) initialization order X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jan 2005 22:17:54 -0000 Maksim Yevmenkin: > Dear Hackers, > > would anyone object if i change SI_ORDER_MIDDLE in the > /sys/netgraph/ng_base.c:2994 to say SI_ORDER_THIRD, i.e. > > change > > DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); > > to > > DECLARE_MODULE(netgraph, netgraph_mod, SI_SUB_DRIVERS, SI_ORDER_THIRD); > > the reason for this change is that bluetooth device drivers depend on > netgraph(4) and when both netgraph(4) and bluetooth device driver > (such as ng_ubt(4)) compiled in the kernel you get a crash. basically > ng_ubt(4) mod_load callback is called before netgraph(4) mod_load > callback and ng_findtype() crashes on uninitialized mutex > (DEVICE_MODULE macro passes SI_SUB_DRIVERS, SI_ORDER_THIRD to the > DECLARE_MODULE). I thought this is the task of MODULE_DEPEND. rik > option #2 would be to have DEVICE_MODULE_ORDERED macro which accepts > two extra parameters. > > > and finally option #3 would be to duplicate entire content of the > DEVICE_MODULE macro in all bluetooth device drivers and specify order > in DECLARE_MODULE macro. > > > any thoughts? > > thanks, > max > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to > "freebsd-current-unsubscribe@freebsd.org"