From owner-svn-src-all@FreeBSD.ORG Fri May 11 02:40:41 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ED70B106566B; Fri, 11 May 2012 02:40:40 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D70BC8FC15; Fri, 11 May 2012 02:40:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q4B2eeWx062370; Fri, 11 May 2012 02:40:40 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q4B2ee9W062365; Fri, 11 May 2012 02:40:40 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201205110240.q4B2ee9W062365@svn.freebsd.org> From: Marius Strobl Date: Fri, 11 May 2012 02:40:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235255 - in head/sys/dev: dc fxp usb/net xl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 May 2012 02:40:41 -0000 Author: marius Date: Fri May 11 02:40:40 2012 New Revision: 235255 URL: http://svn.freebsd.org/changeset/base/235255 Log: - Change the module order of these MAC drivers to be last so they are deterministically handled after the corresponding PHY drivers when loaded as modules. Otherwise, when these MAC/PHY driver pairs are compiled into a single module probing the PHY driver may fail. This makes r151438 and r226154 actually work. [1] Reported and tested by: yongari (fxp(4)) - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Submitted by: jhb [1] MFC after: 3 days Modified: head/sys/dev/dc/if_dc.c head/sys/dev/fxp/if_fxp.c head/sys/dev/usb/net/if_rue.c head/sys/dev/xl/if_xl.c Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/dc/if_dc.c Fri May 11 02:40:40 2012 (r235255) @@ -354,8 +354,9 @@ static driver_t dc_driver = { static devclass_t dc_devclass; -DRIVER_MODULE(dc, pci, dc_driver, dc_devclass, 0, 0); -DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(dc, pci, dc_driver, dc_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, dc, miibus_driver, miibus_devclass, NULL, NULL); #define DC_SETBIT(sc, reg, x) \ CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | (x)) Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/fxp/if_fxp.c Fri May 11 02:40:40 2012 (r235255) @@ -290,7 +290,7 @@ static device_method_t fxp_methods[] = { DEVMETHOD(miibus_writereg, fxp_miibus_writereg), DEVMETHOD(miibus_statchg, fxp_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t fxp_driver = { @@ -301,8 +301,9 @@ static driver_t fxp_driver = { static devclass_t fxp_devclass; -DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0); -DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(fxp, pci, fxp_driver, fxp_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, fxp, miibus_driver, miibus_devclass, NULL, NULL); static struct resource_spec fxp_res_spec_mem[] = { { SYS_RES_MEMORY, FXP_PCI_MMBA, RF_ACTIVE }, Modified: head/sys/dev/usb/net/if_rue.c ============================================================================== --- head/sys/dev/usb/net/if_rue.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/usb/net/if_rue.c Fri May 11 02:40:40 2012 (r235255) @@ -202,8 +202,9 @@ static driver_t rue_driver = { static devclass_t rue_devclass; -DRIVER_MODULE(rue, uhub, rue_driver, rue_devclass, NULL, 0); -DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(rue, uhub, rue_driver, rue_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, rue, miibus_driver, miibus_devclass, NULL, NULL); MODULE_DEPEND(rue, uether, 1, 1, 1); MODULE_DEPEND(rue, usb, 1, 1, 1); MODULE_DEPEND(rue, ether, 1, 1, 1); Modified: head/sys/dev/xl/if_xl.c ============================================================================== --- head/sys/dev/xl/if_xl.c Fri May 11 01:28:25 2012 (r235254) +++ head/sys/dev/xl/if_xl.c Fri May 11 02:40:40 2012 (r235255) @@ -327,8 +327,9 @@ static driver_t xl_driver = { static devclass_t xl_devclass; -DRIVER_MODULE(xl, pci, xl_driver, xl_devclass, 0, 0); -DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0); +DRIVER_MODULE_ORDERED(xl, pci, xl_driver, xl_devclass, NULL, NULL, + SI_ORDER_ANY); +DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, NULL, NULL); static void xl_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error)