From owner-freebsd-hackers@freebsd.org Thu Sep 8 10:02:50 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12015BD1295; Thu, 8 Sep 2016 10:02:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9C1E99; Thu, 8 Sep 2016 10:02:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA03554; Thu, 08 Sep 2016 13:02:47 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1bhwAR-000NjG-DK; Thu, 08 Sep 2016 13:02:47 +0300 Subject: Re: kldload intpm To: John Baldwin References: <9db20b27-254f-b0a5-8f6c-f1eeaadf7829@FreeBSD.org> <16067820.jTuOsBSZ6N@ralph.baldwin.cx> Cc: freebsd-hackers , FreeBSD Current From: Andriy Gapon Message-ID: <8bb32155-0365-bcd4-d487-b1932b34fb6f@FreeBSD.org> Date: Thu, 8 Sep 2016 13:01:26 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <16067820.jTuOsBSZ6N@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2016 10:02:50 -0000 On 07/09/2016 20:49, John Baldwin wrote: > You can request a specific ordering via DRIVER_MODULE_ORDERED (you can specify the > SI_ORDER to use as an extra argument). The typical practice is to load the "base" > driver (the one that attaches highest up the device hierarchy) "last" so that all > other drivers are registered once it tries to attach. For example, in xl(4) this > is used to to have the PCI attachment register last so that the miibus driver is > registered when xl0 attaches: > > DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, > SI_ORDER_ANY); > DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); > > DRIVER_MODULE() uses SI_ORDER_MIDDLE by default. > > This probably needs to be fixed in all of the smbus controller drivers. Thank you for the advice. I'm going to fix intpm. -- Andriy Gapon