aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>1999-09-20 19:06:45 +0000
committerBill Paul <wpaul@FreeBSD.org>1999-09-20 19:06:45 +0000
commit0355003f2605742dbf0322dbf88b8f2a22d36e3a (patch)
tree501aa7f16457ab62c5193c90c212a4bd2383c466
parentd8a4660643d8a33583be4e5affb1a00ebb42e534 (diff)
downloadsrc-0355003f2605742dbf0322dbf88b8f2a22d36e3a.tar.gz
src-0355003f2605742dbf0322dbf88b8f2a22d36e3a.zip
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.
Notes
Notes: svn path=/head/; revision=51473
-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 d2438e318cbc..84cabd2fae85 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 9d67f91357a3..35d6f2909fa5 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 04c1bf72fe09..d80e4abb22ca 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 947f6c1c26ee..7fefb8e3f0f4 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 23f9ca90e8a0..7ed0d86e5e8a 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 0cb2daf788a3..da6637f53241 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 356eafd5f94e..38cc134b37e5 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 d2438e318cbc..84cabd2fae85 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 739ff3bd1d43..a6fbdb4486cf 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 8483cc98c5eb..63b9141cf72e 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 c7bf0b478abc..d7a2248099b5 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 9d67f91357a3..35d6f2909fa5 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 419c176719c1..1f92f08b26aa 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 04c1bf72fe09..d80e4abb22ca 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 2d6d31eb215a..2248725cef1b 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 947f6c1c26ee..7fefb8e3f0f4 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 f848d0a3deb9..ed43a819b04e 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 23f9ca90e8a0..7ed0d86e5e8a 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 f5770bd3776e..f05c1914cde3 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 7358dd8b8329..36ff5a29bb75 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