summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2012-05-11 02:40:40 +0000
committermarius <marius@FreeBSD.org>2012-05-11 02:40:40 +0000
commit8abe2314ae85e655915788fd072f42fbfa247733 (patch)
treeb31b70f628f5070c2436173586ad3581fe39e033 /sys
parent56245e656edfc8f0ae3786833dd045adc3352069 (diff)
downloadFreeBSD-src-8abe2314ae85e655915788fd072f42fbfa247733.zip
FreeBSD-src-8abe2314ae85e655915788fd072f42fbfa247733.tar.gz
- 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
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c5
-rw-r--r--sys/dev/fxp/if_fxp.c7
-rw-r--r--sys/dev/usb/net/if_rue.c5
-rw-r--r--sys/dev/xl/if_xl.c5
4 files changed, 13 insertions, 9 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 0ace34e..f8f9af2 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -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))
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index f8154c6..3dc1e19 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -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 },
diff --git a/sys/dev/usb/net/if_rue.c b/sys/dev/usb/net/if_rue.c
index 894e368..a08d851 100644
--- a/sys/dev/usb/net/if_rue.c
+++ b/sys/dev/usb/net/if_rue.c
@@ -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);
diff --git a/sys/dev/xl/if_xl.c b/sys/dev/xl/if_xl.c
index 7a913f4..22591d0 100644
--- a/sys/dev/xl/if_xl.c
+++ b/sys/dev/xl/if_xl.c
@@ -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)
OpenPOWER on IntegriCloud