summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-09-20 19:06:45 +0000
committerwpaul <wpaul@FreeBSD.org>1999-09-20 19:06:45 +0000
commit93e77b056762475c3c25ed8a6e2f428c8969b448 (patch)
tree6ef7020cd8a2512de0b3891c7e9c1a5b3e7c3804 /sys
parent366967cbc92c894dd4d506aa9ec4a657878877bf (diff)
downloadFreeBSD-src-93e77b056762475c3c25ed8a6e2f428c8969b448.zip
FreeBSD-src-93e77b056762475c3c25ed8a6e2f428c8969b448.tar.gz
Un-do the changes to the DRIVER_MODULE() declarations in these drivers.
This whole idea isn't going to work until somebody makes the bus/kld code smarter. The idea here is to change the module's internal name from "foo" to "if_foo" so that ifconfig can tell a network driver from a non-network one. However doing this doesn't work correctly no matter how you slice it. For everything to work, you have to change the name in both the driver_t struct and the DRIVER_MODULE() declaration. The problems are: - If you change the name in both places, then the kernel thinks that the device's name is now "if_foo", so you get things like: if_foo0: <FOO ethernet> irq foo at device foo on pcifoo if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo This is bogus. Now the device name doesn't agree with the logical interface name. There's no reason for this, and it violates the principle of least astonishment. - If you leave the name in the driver_t struct as "foo" and only change the names in the DRIVER_MODULE() declaration to "if_foo" then attaching drivers to child devices doesn't work because the names don't agree. This breaks miibus: drivers that need to have miibuses and PHY drivers attached never get them. In other words: damned if you do, damned if you don't. This needs to be thought through some more. Since the drivers that use miibus are broken, I have to change these all back in order to make them work again. Yes this will stop ifconfig from being able to demand load driver modules. On the whole, I'd rather have that than having the drivers not work at all.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/fxp/if_fxp.c2
-rw-r--r--sys/dev/sf/if_sf.c4
-rw-r--r--sys/dev/sk/if_sk.c2
-rw-r--r--sys/dev/ti/if_ti.c2
-rw-r--r--sys/dev/vr/if_vr.c4
-rw-r--r--sys/pci/if_ax.c2
-rw-r--r--sys/pci/if_dm.c4
-rw-r--r--sys/pci/if_fxp.c2
-rw-r--r--sys/pci/if_mx.c2
-rw-r--r--sys/pci/if_pn.c2
-rw-r--r--sys/pci/if_rl.c4
-rw-r--r--sys/pci/if_sf.c4
-rw-r--r--sys/pci/if_sis.c4
-rw-r--r--sys/pci/if_sk.c2
-rw-r--r--sys/pci/if_ste.c4
-rw-r--r--sys/pci/if_ti.c2
-rw-r--r--sys/pci/if_tl.c4
-rw-r--r--sys/pci/if_vr.c4
-rw-r--r--sys/pci/if_wb.c4
-rw-r--r--sys/pci/if_xl.c4
20 files changed, 31 insertions, 31 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index d2438e3..84cabd2 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -701,7 +701,7 @@ static driver_t fxp_driver = {
static devclass_t fxp_devclass;
-DRIVER_MODULE(if_fxp, pci, fxp_driver, fxp_devclass, 0, 0);
+DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0);
#endif /* __NetBSD__ */
diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c
index 9d67f91..35d6f29 100644
--- a/sys/dev/sf/if_sf.c
+++ b/sys/dev/sf/if_sf.c
@@ -208,8 +208,8 @@ static driver_t sf_driver = {
static devclass_t sf_devclass;
-DRIVER_MODULE(if_sf, pci, sf_driver, sf_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_sf, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(sf, pci, sf_driver, sf_devclass, 0, 0);
+DRIVER_MODULE(miibus, sf, miibus_driver, miibus_devclass, 0, 0);
#define SF_SETBIT(sc, reg, x) \
csr_write_4(sc, reg, csr_read_4(sc, reg) | x)
diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c
index 04c1bf7..d80e4ab 100644
--- a/sys/dev/sk/if_sk.c
+++ b/sys/dev/sk/if_sk.c
@@ -181,7 +181,7 @@ static driver_t sk_driver = {
static devclass_t sk_devclass;
-DRIVER_MODULE(if_skc, pci, sk_driver, sk_devclass, 0, 0);
+DRIVER_MODULE(skc, pci, sk_driver, sk_devclass, 0, 0);
#define SK_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | x)
diff --git a/sys/dev/ti/if_ti.c b/sys/dev/ti/if_ti.c
index 947f6c1..7fefb8e 100644
--- a/sys/dev/ti/if_ti.c
+++ b/sys/dev/ti/if_ti.c
@@ -224,7 +224,7 @@ static driver_t ti_driver = {
static devclass_t ti_devclass;
-DRIVER_MODULE(if_ti, pci, ti_driver, ti_devclass, 0, 0);
+DRIVER_MODULE(ti, pci, ti_driver, ti_devclass, 0, 0);
/*
* Send an instruction or address to the EEPROM, check for ACK.
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c
index 23f9ca9..7ed0d86 100644
--- a/sys/dev/vr/if_vr.c
+++ b/sys/dev/vr/if_vr.c
@@ -202,8 +202,8 @@ static driver_t vr_driver = {
static devclass_t vr_devclass;
-DRIVER_MODULE(if_vr, pci, vr_driver, vr_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_vr, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(vr, pci, vr_driver, vr_devclass, 0, 0);
+DRIVER_MODULE(miibus, vr, miibus_driver, miibus_devclass, 0, 0);
#define VR_SETBIT(sc, reg, x) \
CSR_WRITE_1(sc, reg, \
diff --git a/sys/pci/if_ax.c b/sys/pci/if_ax.c
index 0cb2daf..da6637f 100644
--- a/sys/pci/if_ax.c
+++ b/sys/pci/if_ax.c
@@ -197,7 +197,7 @@ static driver_t ax_driver = {
static devclass_t ax_devclass;
-DRIVER_MODULE(if_ax, pci, ax_driver, ax_devclass, 0, 0);
+DRIVER_MODULE(ax, pci, ax_driver, ax_devclass, 0, 0);
#define AX_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_dm.c b/sys/pci/if_dm.c
index 356eafd..38cc134 100644
--- a/sys/pci/if_dm.c
+++ b/sys/pci/if_dm.c
@@ -190,8 +190,8 @@ static driver_t dm_driver = {
static devclass_t dm_devclass;
-DRIVER_MODULE(if_dm, pci, dm_driver, dm_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_dm, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(dm, pci, dm_driver, dm_devclass, 0, 0);
+DRIVER_MODULE(miibus, dm, miibus_driver, miibus_devclass, 0, 0);
#define DM_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index d2438e3..84cabd2 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -701,7 +701,7 @@ static driver_t fxp_driver = {
static devclass_t fxp_devclass;
-DRIVER_MODULE(if_fxp, pci, fxp_driver, fxp_devclass, 0, 0);
+DRIVER_MODULE(fxp, pci, fxp_driver, fxp_devclass, 0, 0);
#endif /* __NetBSD__ */
diff --git a/sys/pci/if_mx.c b/sys/pci/if_mx.c
index 739ff3b..a6fbdb4 100644
--- a/sys/pci/if_mx.c
+++ b/sys/pci/if_mx.c
@@ -215,7 +215,7 @@ static driver_t mx_driver = {
static devclass_t mx_devclass;
-DRIVER_MODULE(if_mx, pci, mx_driver, mx_devclass, 0, 0);
+DRIVER_MODULE(mx, pci, mx_driver, mx_devclass, 0, 0);
#define MX_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_pn.c b/sys/pci/if_pn.c
index 8483cc9..63b9141 100644
--- a/sys/pci/if_pn.c
+++ b/sys/pci/if_pn.c
@@ -207,7 +207,7 @@ static driver_t pn_driver = {
static devclass_t pn_devclass;
-DRIVER_MODULE(if_pn, pci, pn_driver, pn_devclass, 0, 0);
+DRIVER_MODULE(pn, pci, pn_driver, pn_devclass, 0, 0);
#define PN_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index c7bf0b4..d7a2248 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -228,8 +228,8 @@ static driver_t rl_driver = {
static devclass_t rl_devclass;
-DRIVER_MODULE(if_rl, pci, rl_driver, rl_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_rl, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(rl, pci, rl_driver, rl_devclass, 0, 0);
+DRIVER_MODULE(miibus, rl, miibus_driver, miibus_devclass, 0, 0);
#define EE_SET(x) \
CSR_WRITE_1(sc, RL_EECMD, \
diff --git a/sys/pci/if_sf.c b/sys/pci/if_sf.c
index 9d67f91..35d6f29 100644
--- a/sys/pci/if_sf.c
+++ b/sys/pci/if_sf.c
@@ -208,8 +208,8 @@ static driver_t sf_driver = {
static devclass_t sf_devclass;
-DRIVER_MODULE(if_sf, pci, sf_driver, sf_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_sf, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(sf, pci, sf_driver, sf_devclass, 0, 0);
+DRIVER_MODULE(miibus, sf, miibus_driver, miibus_devclass, 0, 0);
#define SF_SETBIT(sc, reg, x) \
csr_write_4(sc, reg, csr_read_4(sc, reg) | x)
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c
index 419c176..1f92f08 100644
--- a/sys/pci/if_sis.c
+++ b/sys/pci/if_sis.c
@@ -185,8 +185,8 @@ static driver_t sis_driver = {
static devclass_t sis_devclass;
-DRIVER_MODULE(if_sis, pci, sis_driver, sis_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_sis, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(sis, pci, sis_driver, sis_devclass, 0, 0);
+DRIVER_MODULE(miibus, sis, miibus_driver, miibus_devclass, 0, 0);
#define SIS_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_sk.c b/sys/pci/if_sk.c
index 04c1bf7..d80e4ab 100644
--- a/sys/pci/if_sk.c
+++ b/sys/pci/if_sk.c
@@ -181,7 +181,7 @@ static driver_t sk_driver = {
static devclass_t sk_devclass;
-DRIVER_MODULE(if_skc, pci, sk_driver, sk_devclass, 0, 0);
+DRIVER_MODULE(skc, pci, sk_driver, sk_devclass, 0, 0);
#define SK_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | x)
diff --git a/sys/pci/if_ste.c b/sys/pci/if_ste.c
index 2d6d31e..2248725 100644
--- a/sys/pci/if_ste.c
+++ b/sys/pci/if_ste.c
@@ -172,8 +172,8 @@ static driver_t ste_driver = {
static devclass_t ste_devclass;
-DRIVER_MODULE(if_ste, pci, ste_driver, ste_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_ste, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(ste, pci, ste_driver, ste_devclass, 0, 0);
+DRIVER_MODULE(miibus, ste, miibus_driver, miibus_devclass, 0, 0);
#define STE_SETBIT4(sc, reg, x) \
CSR_WRITE_4(sc, reg, CSR_READ_4(sc, reg) | x)
diff --git a/sys/pci/if_ti.c b/sys/pci/if_ti.c
index 947f6c1..7fefb8e 100644
--- a/sys/pci/if_ti.c
+++ b/sys/pci/if_ti.c
@@ -224,7 +224,7 @@ static driver_t ti_driver = {
static devclass_t ti_devclass;
-DRIVER_MODULE(if_ti, pci, ti_driver, ti_devclass, 0, 0);
+DRIVER_MODULE(ti, pci, ti_driver, ti_devclass, 0, 0);
/*
* Send an instruction or address to the EEPROM, check for ACK.
diff --git a/sys/pci/if_tl.c b/sys/pci/if_tl.c
index f848d0a..ed43a81 100644
--- a/sys/pci/if_tl.c
+++ b/sys/pci/if_tl.c
@@ -361,8 +361,8 @@ static driver_t tl_driver = {
static devclass_t tl_devclass;
-DRIVER_MODULE(if_tl, pci, tl_driver, tl_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_tl, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(tl, pci, tl_driver, tl_devclass, 0, 0);
+DRIVER_MODULE(miibus, tl, miibus_driver, miibus_devclass, 0, 0);
static u_int8_t tl_dio_read8(sc, reg)
struct tl_softc *sc;
diff --git a/sys/pci/if_vr.c b/sys/pci/if_vr.c
index 23f9ca9..7ed0d86 100644
--- a/sys/pci/if_vr.c
+++ b/sys/pci/if_vr.c
@@ -202,8 +202,8 @@ static driver_t vr_driver = {
static devclass_t vr_devclass;
-DRIVER_MODULE(if_vr, pci, vr_driver, vr_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_vr, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(vr, pci, vr_driver, vr_devclass, 0, 0);
+DRIVER_MODULE(miibus, vr, miibus_driver, miibus_devclass, 0, 0);
#define VR_SETBIT(sc, reg, x) \
CSR_WRITE_1(sc, reg, \
diff --git a/sys/pci/if_wb.c b/sys/pci/if_wb.c
index f5770bd..f05c191 100644
--- a/sys/pci/if_wb.c
+++ b/sys/pci/if_wb.c
@@ -229,8 +229,8 @@ static driver_t wb_driver = {
static devclass_t wb_devclass;
-DRIVER_MODULE(if_wb, pci, wb_driver, wb_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_wb, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(wb, pci, wb_driver, wb_devclass, 0, 0);
+DRIVER_MODULE(miibus, wb, miibus_driver, miibus_devclass, 0, 0);
#define WB_SETBIT(sc, reg, x) \
CSR_WRITE_4(sc, reg, \
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 7358dd8..36ff5a2 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -284,8 +284,8 @@ static driver_t xl_driver = {
static devclass_t xl_devclass;
-DRIVER_MODULE(if_xl, pci, xl_driver, xl_devclass, 0, 0);
-DRIVER_MODULE(miibus, if_xl, miibus_driver, miibus_devclass, 0, 0);
+DRIVER_MODULE(xl, pci, xl_driver, xl_devclass, 0, 0);
+DRIVER_MODULE(miibus, xl, miibus_driver, miibus_devclass, 0, 0);
/*
* Murphy's law says that it's possible the chip can wedge and
OpenPOWER on IntegriCloud