From owner-svn-src-stable@FreeBSD.ORG Tue Aug 12 12:18:45 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E458F16C for ; Tue, 12 Aug 2014 12:18:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4F732628 for ; Tue, 12 Aug 2014 12:18:44 +0000 (UTC) Received: from hselasky (uid 1241) (envelope-from hselasky@FreeBSD.org) id 6ee1 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Tue, 12 Aug 2014 12:18:44 +0000 From: Hans Petter Selasky Date: Tue, 12 Aug 2014 12:18:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r269863 - in stable/9/sys/ofed: drivers/infiniband/hw/mlx4 drivers/net/mlx4 include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53ea0624.6ee1.2d8f4b2a@svn.freebsd.org> X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2014 12:18:45 -0000 Author: hselasky Date: Tue Aug 12 12:18:43 2014 New Revision: 269863 URL: http://svnweb.freebsd.org/changeset/base/269863 Log: MFC r268316: Fix OFED startup order: All SYSINIT()'s and modules should be loaded prior to starting "/sbin/init" which will run all the "/etc/rc.d/xxx" scripts. Else there can be a race configuring the interfaces via "/etc/rc.conf". Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/9/sys/ofed/drivers/net/mlx4/en_main.c stable/9/sys/ofed/drivers/net/mlx4/main.c stable/9/sys/ofed/include/linux/module.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/infiniband/hw/mlx4/main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -1576,5 +1576,5 @@ static moduledata_t mlx4ib_mod = { .name = "mlx4ib", .evhand = mlx4ib_evhand, }; -DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); Modified: stable/9/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/net/mlx4/en_main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -379,5 +379,5 @@ static moduledata_t mlxen_mod = { .name = "mlxen", .evhand = mlxen_evhand, }; -DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); Modified: stable/9/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/drivers/net/mlx4/main.c Tue Aug 12 12:18:43 2014 (r269863) @@ -1699,4 +1699,4 @@ static moduledata_t mlx4_mod = { .evhand = mlx4_evhand, }; MODULE_VERSION(mlx4, 1); -DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_SMP, SI_ORDER_ANY); +DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); Modified: stable/9/sys/ofed/include/linux/module.h ============================================================================== --- stable/9/sys/ofed/include/linux/module.h Tue Aug 12 12:10:29 2014 (r269862) +++ stable/9/sys/ofed/include/linux/module.h Tue Aug 12 12:18:43 2014 (r269863) @@ -44,6 +44,11 @@ #define EXPORT_SYMBOL(name) #define EXPORT_SYMBOL_GPL(name) +/* OFED pre-module initialization */ +#define SI_SUB_OFED_PREINIT (SI_SUB_KTHREAD_INIT - 2) +/* OFED default module initialization */ +#define SI_SUB_OFED_MODINIT (SI_SUB_KTHREAD_INIT - 1) + #include static inline void @@ -68,17 +73,17 @@ _module_run(void *arg) } #define module_init(fn) \ - SYSINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) /* * XXX This is a freebsdism designed to work around not having a module * load order resolver built in. */ #define module_init_order(fn, order) \ - SYSINIT(fn, SI_SUB_LAST, (order), _module_run, (fn)) + SYSINIT(fn, SI_SUB_OFED_MODINIT, (order), _module_run, (fn)) #define module_exit(fn) \ - SYSUNINIT(fn, SI_SUB_LAST, SI_ORDER_FIRST, _module_run, (fn)) + SYSUNINIT(fn, SI_SUB_OFED_MODINIT, SI_ORDER_FIRST, _module_run, (fn)) #define module_get(module) #define module_put(module)