opnsense-src/sys/dev
Bill Paul d00275330d This commit adds support for the NetBSD MII abstraction layer and
MII-compliant PHY drivers. Many 10/100 ethernet NICs available today
either use an MII transceiver or have built-in transceivers that can
be programmed using an MII interface. It makes sense then to separate
this support out into common code instead of duplicating it in all
of the NIC drivers. The mii code also handles all of the media
detection, selection and reporting via the ifmedia interface.

This is basically the same code from NetBSD's /sys/dev/mii, except
it's been adapted to FreeBSD's bus architecture. The advantage to this
is that it automatically allows everything to be turned into a
loadable module. There are some common functions for use in drivers
once an miibus has been attached (mii_mediachg(), mii_pollstat(),
mii_tick()) as well as individual PHY drivers. There is also a
generic driver for all PHYs that aren't handled by a specific driver.
It's possible to do this because all 10/100 PHYs implement the same
general register set in addition to their vendor-specific register
sets, so for the most part you can use one driver for pretty much
any PHY. There are a couple of oddball exceptions though, hence
the need to have specific drivers.

There are two layers: the generic "miibus" layer and the PHY driver
layer. The drivers are child devices of "miibus" and the "miibus" is
a child of a given NIC driver. The "miibus" code and the PHY drivers
can actually be compiled and kldoaded as completely separate modules
or compiled together into one module. For the moment I'm using the
latter approach since the code is relatively small.

Currently there are only three PHY drivers here: the generic driver,
the built-in 3Com XL driver and the NS DP83840 driver. I'll be adding
others later as I convert various NIC drivers to use this code.

I realize that I'm cvs adding this stuff instead of importing it
onto a separate vendor branch, but in my opinion the import approach
doesn't really offer any significant advantage: I'm going to be
maintaining this stuff and writing my own PHY drivers one way or
the other.
1999-08-21 17:40:53 +00:00
..
advansys Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
aha Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
ahb Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
aic7xxx Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
amd Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
ar Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
ata Spring cleaning around strategy and disklabels/slices: 1999-08-14 11:40:51 +00:00
atkbdc Recognize Interlink VersaPad. `Tap' action will be recognized 1999-08-17 12:14:13 +00:00
bktr Alter the behavior of sys/kern/subr_bus.c:device_print_child() 1999-07-29 01:03:04 +00:00
buslogic Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
ccd Spring cleaning around strategy and disklabels/slices: 1999-08-14 11:40:51 +00:00
cs Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
cy Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entire 1999-07-03 20:17:08 +00:00
de Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
dec Calibrate the processor cycle counter instead of believing what the 1999-05-18 21:24:16 +00:00
dgb Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
dpt Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
ed Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
eisa I'm not sure how this wasn't in the last commit but anyhow... 1999-08-02 20:01:40 +00:00
en Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
ep Set ifp->if_init to the right function. 1999-08-20 14:12:14 +00:00
ex Make these actually compile. I got a little delete happy pruning includes 1999-08-18 22:14:24 +00:00
fb Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
fdc Spring cleaning around strategy and disklabels/slices: 1999-08-14 11:40:51 +00:00
fe Make these actually compile. I got a little delete happy pruning includes 1999-08-18 22:14:24 +00:00
fxp Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
hea Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
hfa Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
ic Fixed 10 out of 40 lines of -Wcast-qual warnings/errors. 3 lines were 1999-05-13 12:21:41 +00:00
ida Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
ie Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
iicbus Alter the behavior of sys/kern/subr_bus.c:device_print_child() 1999-07-29 01:03:04 +00:00
isp Clarify and cleanup some CAM queueing breakages. 1999-08-16 20:11:45 +00:00
joy Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
kbd Correctly save `flags' bits. 1999-08-15 06:06:14 +00:00
lnc Set ifp->if_init to the right function. 1999-08-20 14:12:14 +00:00
mc146818 Major changes to the generic device framework for FreeBSD/alpha: 1998-06-14 13:46:10 +00:00
mcd Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
mii This commit adds support for the NetBSD MII abstraction layer and 1999-08-21 17:40:53 +00:00
mse Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
pccard Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>, 1999-08-08 18:43:05 +00:00
pcf Alter the behavior of sys/kern/subr_bus.c:device_print_child() 1999-07-29 01:03:04 +00:00
pci Alter the behavior of sys/kern/subr_bus.c:device_print_child() 1999-07-29 01:03:04 +00:00
pcm/isa Add support for ASound Gold card using the ALS120 1999-05-27 06:12:40 +00:00
pdq Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
ppbus Add pin-numbers for easy reference. 1999-08-18 20:45:57 +00:00
ppc Return the port size from the probe. 1999-04-22 13:10:43 +00:00
rc Fixed null setting of `rc_started'. This was fixed for the 1999-06-04 18:53:47 +00:00
rp Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
scd Simplify cdevsw registration. 1999-05-31 11:29:30 +00:00
sf Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() and 1999-07-25 05:16:05 +00:00
si printf("%x",dev); -> printf("%s",devtoname(dev)); 1999-08-18 17:42:41 +00:00
sio make alpha compile again. 1999-08-09 11:02:45 +00:00
sk Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() and 1999-07-25 05:16:05 +00:00
smbus Alter the behavior of sys/kern/subr_bus.c:device_print_child() 1999-07-29 01:03:04 +00:00
snp Add Id strings 1999-06-17 23:42:45 +00:00
sound/isa Add support for ASound Gold card using the ALS120 1999-05-27 06:12:40 +00:00
speaker Welcome devtoname(), to most likely be used when printing information 1999-08-17 20:25:50 +00:00
sr Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
streams Fix fd race conditions (during shared fd table usage.) Badfileops is 1999-08-04 18:53:50 +00:00
syscons Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
ti Minor glitch in ti_newbuf_jumbo(): m_adj() was being called on 1999-08-14 15:45:03 +00:00
tx Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
usb 1) rename dev->self to be consistent 1999-08-18 10:24:59 +00:00
vinum free_drive: mark drive down. This may fix a panic in the 'start' command. 1999-08-16 05:09:39 +00:00
vn Spring cleaning around strategy and disklabels/slices: 1999-08-14 11:40:51 +00:00
vr Small tweak: remember to free the tx ring data (which is malloc()ed) if 1999-08-10 21:12:11 +00:00
vx Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
wi Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
wl Make these actually compile. I got a little delete happy pruning includes 1999-08-18 22:14:24 +00:00
xe Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>, 1999-08-08 18:43:05 +00:00