summaryrefslogtreecommitdiffstats
path: root/sys/modules/xl
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-08-29 15:52:19 +0000
committerwpaul <wpaul@FreeBSD.org>1999-08-29 15:52:19 +0000
commita7cde9673c19c149f91a247b78e4e261f5682da6 (patch)
tree5498ea819746fbe8f7a805d83e78c5d436ff97f5 /sys/modules/xl
parent7cdd93ef08c6f768a31dd4304057bf02fd156a3d (diff)
downloadFreeBSD-src-a7cde9673c19c149f91a247b78e4e261f5682da6.zip
FreeBSD-src-a7cde9673c19c149f91a247b78e4e261f5682da6.tar.gz
Convert the 3Com XL driver to miibus. This one is a little tricky
due to the fact that there are non-MII cards supported by the same driver and I don't have all of the cards available for testing. There's also the 3c905B-COMBO which has MII, AUI and BNC media ports all in one package. Supporting the COMBO is difficult because we have to add the 10base5 and 10base2 media types to the same ifmedia struct as the MII-attached types, however there is no way to force the miibus and child PHYs into existence before xl_attach() completes, so there is no ifmedia struct available in xl_attach(). What we do inistead is use the mediainit method as a callback: when a child PHY is attached, it calls the miibus mediainit routine which selects a default media. This routing also calls the NIC driver's mediainit method (if it implements one) at which point we can safely add the other media types.
Diffstat (limited to 'sys/modules/xl')
-rw-r--r--sys/modules/xl/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/modules/xl/Makefile b/sys/modules/xl/Makefile
index 6a5b533..35b7f07 100644
--- a/sys/modules/xl/Makefile
+++ b/sys/modules/xl/Makefile
@@ -4,7 +4,9 @@ S = ${.CURDIR}/../..
.PATH: $S/pci
KMOD = xl
SRCS = if_xl.c xl.h bpf.h opt_bdg.h device_if.h bus_if.h pci_if.h
+SRCS += miibus_if.h
CLEANFILES += xl.h bpf.h opt_bdg.h device_if.h bus_if.h pci_if.h
+CLEANFILES += miibus_if.h
CFLAGS += ${DEBUG_FLAGS}
xl.h:
@@ -25,4 +27,7 @@ bus_if.h: $S/kern/makedevops.pl $S/kern/bus_if.m
pci_if.h: $S/kern/makedevops.pl $S/pci/pci_if.m
perl $S/kern/makedevops.pl -h $S/pci/pci_if.m
+miibus_if.h: $S/kern/makedevops.pl $S/dev/mii/miibus_if.m
+ perl $S/kern/makedevops.pl -h $S/dev/mii/miibus_if.m
+
.include <bsd.kmod.mk>
OpenPOWER on IntegriCloud