freebsd-skq/sys/i386
wpaul cdea47dc6e 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
..
apm Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
bios Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
boot Back the last change out. 1999-05-25 10:30:52 +00:00
conf This commit adds support for the NetBSD MII abstraction layer and 1999-08-21 17:40:53 +00:00
eisa Properly set the alignment argument to bus_dma_tag_create(). If we 1999-08-16 01:52:21 +00:00
i386 Loosen up the constructed argument segment generation slightly; rather than 1999-08-20 21:08:41 +00:00
ibcs2 Rename struct members sa_siginfo. POSIX reserves identifiers starting 1999-07-06 06:55:29 +00:00
include Undo my previous commit and do it differently. Break the ffs() etc macros 1999-08-19 14:54:40 +00:00
isa Implement a new generic mechanism for attaching handler functions to 1999-08-21 06:24:40 +00:00
linux Fix a bug in debug-printfs of struct linux_termios fields, where I forgot to 1999-08-17 10:27:55 +00:00
pci Hopefully fix the previous commit, it caused *all* bridges to be detected 1999-08-10 09:22:21 +00:00
svr4 Add $Id$ tags. 1999-07-30 12:47:17 +00:00
Makefile Update to know about current kernel directory layout. 1999-02-28 22:14:16 +00:00