| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
- In exphy_service() for the MII_TICK case don't bother to check whether
the currently selected media is of type IFM_AUTO as auto-negotiation
doesn't need to be kicked anyway.
- Remove #if 0'ed unapplicable code.
- Fix some whitespace nits.
MFC after: 1 week
|
|
|
|
|
|
| |
indices when manually adding media. Some of these I've missed while
converting drivers to take advantage of said fuctions recently,
others where longstanding bugs.
|
|
|
|
|
|
|
| |
(BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc).
There is no functional changes.
Reviewed by: oleg, scottl
|
|
|
|
| |
with NetBSD (and cause it looks cooler).
|
| |
|
|
|
|
|
| |
the license(s) and before the driver comment (the latter only in drivers not
having __FBSDID at that location).
|
|
|
|
| |
Also some minor style cleanups.
|
| |
|
|
|
|
| |
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
|
|
|
|
|
| |
Cleanup my earlier de-__P sweep and remove whitespace between function
names and paramters.
|
|
|
|
|
|
| |
in the 3C905C. This is mainly cosmetic.
I'm doing this mainly so we share the same identifier as NetBSD.
|
|
|
|
| |
exphy is done flying blind, ukphy is tested on one card.
|
|
|
|
|
|
|
| |
Rename mii_phy_auto_stop() mii_phy_down().
Introduce mii_down(), use it from nge. Do not indirect it to 19 identical
case's in 19 switchstatements like NetBSD did.
|
|
|
|
| |
mistakes like the one brgphy.c (now corrected).
|
| |
|
| |
|
|
|
|
|
|
|
| |
. Make internal service routines static.
. Use a consistent ordering of checks in MII_TICK. Do the work in the
mii_phy_tick() subroutine if appropriate.
. Call mii_phy_update() to trigger the callbacks.
|
|
|
|
|
|
| |
(even though I want the fixes in -stable anyway). I'm sure I'm going
to get flamed now for committing to -stable and -current too quickly.
*sigh*
|
|
|
|
| |
Remove ~60 unneeded #include <sys/malloc.h>
|
|
|
|
|
|
|
| |
drivers so that we don't clobber things or leave them uninitialized
if we abort due a failure.
Submitted by: Luoqi Chen
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
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.
|