summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_sk.c
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/pci/if_sk.c
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/pci/if_sk.c')
-rw-r--r--sys/pci/if_sk.c2
1 files changed, 1 insertions, 1 deletions
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)
OpenPOWER on IntegriCloud