Commit Graph

16 Commits

Author SHA1 Message Date
Bill Paul
8562ad200e Do some more work on the mxphy pseudo-driver to make it better at media
detection and remove the long delays that I had used previously. Everything
should be handled by timeouts now.
1999-11-01 17:10:26 +00:00
Bill Paul
ed8c6514c4 Convert the mx driver to miibus.
In order to make this work, I created a pseudo-PHY driver to deal with
Macronix chips that use the built-in NWAY support and symbol mode port.
This is actually all of them, with the exception of the original MX98713
which presents its NWAY support via the MII serial interface.

The mxphy driver actually manipulates the controller registers directly
rather than using the miibus_readreg()/miibus_writereg() bus interface
since there are no MII registers to read. The mx driver itself pretends
that the NWAY interface is a PHY locayed at MII address 31 for the sole
purpose of allowing the mxphy_probe() routine to know when it needs to
attach to a host controller.
1999-10-16 05:24:13 +00:00
Bill Paul
2d8fad26b3 Allow the AMD PHY driver to support the DM9101 PHY. The DM9101 and the
AMD AM79c873 have identical registers. I'm not sure why; one is probably
a clone of the other.
1999-09-19 21:56:08 +00:00
Bill Paul
bbf7ca2249 Add a driver for the AMD AM79c873 10/100 PHY. By some strange coincidence,
this PHY and the Davicom DM9101 have exactly the same register definitions.
One of them is probably a clone of the other. I'm not sure which.

This is needed for the Davicom DM9102 10/100 PCI ethernet driver which
will be committed shortly.
1999-09-06 05:27:55 +00:00
Peter Wemm
3ca1647688 $Id$ -> $FreeBSD$ 1999-09-05 15:21:05 +00:00
Bill Paul
1ff33426c8 Re-arrange things in the attach routines of the 3Com and RealTek PHY
drivers so that we don't clobber things or leave them uninitialized
if we abort due a failure.

Submitted by:	Luoqi Chen
1999-09-01 17:07:27 +00:00
Bill Paul
a4f02d20ed Add a driver for the internal PHY in the RealTek 8139. 1999-08-31 14:43:30 +00:00
Bill Paul
9052a8fa41 Regenerate miidevs.h. 1999-08-29 15:44:07 +00:00
Bill Paul
24a7e3d3de The ASIC on the 3c905C appears to be manufactured by Broadcom (previous
ones were made by Lucent). The Broadcom chip also appears to use an
internal PHY made by Broadcom which uses the Broadcom OUI. This is different
from previous ASICs which always returned 0 in the PHY ID registers.
To account for this, I added the necessary ID values for the Broadcom
PHY so that it can be detected and attached using the 3Com PHY driver
instead of defaulting to the generic one.
1999-08-29 15:42:04 +00:00
Peter Wemm
ee15718941 $Id$ -> $FreeBSD$ (some mangled and/or hidden ones) 1999-08-28 02:21:15 +00:00
Peter Wemm
280652828b $Id$ -> $FreeBSD$ 1999-08-28 02:16:32 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Bill Paul
d341237291 Add miibus drivers for the ThunderLAN internal PHY and the Micro Linear
ML6692 PHY. The Micro Linear driver is my own; the ThunderLAN driver is
a port of the NetBSD driver with various hacks. The ML driver is necessary
to support the Olicom OC-2326 ThunderLAN-based NIC.

Also regenerated miidevs.h to pick up the proper 'obtained from'
revision string.
1999-08-27 18:33:36 +00:00
Bill Paul
2f0f7ef0a6 Handle buses with multiple PHYs correctly. 1999-08-26 05:30:33 +00:00
Bill Paul
a30ecd6149 Crap, I knew I was going to forget something: add missing miibus method
description file which slipped through the cracks.

Pointed out by: Doug <Doug@gorean.org>
1999-08-22 00:56:39 +00:00
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