Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2012 03:11:08 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r235422 - in stable/9/sys: dev/dc dev/fxp dev/usb/net dev/xl i386/conf kern
Message-ID:  <201205140311.q4E3B8DG012131@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Mon May 14 03:11:07 2012
New Revision: 235422
URL: http://svn.freebsd.org/changeset/base/235422

Log:
  MFC: r235255
  
  - 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]

Modified:
  stable/9/sys/dev/dc/if_dc.c
  stable/9/sys/dev/fxp/if_fxp.c
  stable/9/sys/dev/usb/net/if_rue.c
  stable/9/sys/dev/xl/if_xl.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/fs/   (props changed)
  stable/9/sys/fs/ntfs/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)
  stable/9/sys/kern/subr_witness.c   (props changed)

Modified: stable/9/sys/dev/dc/if_dc.c
==============================================================================
--- stable/9/sys/dev/dc/if_dc.c	Mon May 14 01:01:39 2012	(r235421)
+++ stable/9/sys/dev/dc/if_dc.c	Mon May 14 03:11:07 2012	(r235422)
@@ -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: stable/9/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/9/sys/dev/fxp/if_fxp.c	Mon May 14 01:01:39 2012	(r235421)
+++ stable/9/sys/dev/fxp/if_fxp.c	Mon May 14 03:11:07 2012	(r235422)
@@ -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: stable/9/sys/dev/usb/net/if_rue.c
==============================================================================
--- stable/9/sys/dev/usb/net/if_rue.c	Mon May 14 01:01:39 2012	(r235421)
+++ stable/9/sys/dev/usb/net/if_rue.c	Mon May 14 03:11:07 2012	(r235422)
@@ -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: stable/9/sys/dev/xl/if_xl.c
==============================================================================
--- stable/9/sys/dev/xl/if_xl.c	Mon May 14 01:01:39 2012	(r235421)
+++ stable/9/sys/dev/xl/if_xl.c	Mon May 14 03:11:07 2012	(r235422)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205140311.q4E3B8DG012131>