summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/miivar.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove mii_media_from_bmcr(); all previous users have been converted tomarius2007-01-131-2/+0
| | | | use mii_phy_add_media()/mii_phy_setmedia().
* Add a helper function mii_phy_dev_probe(), which wraps around themarius2006-12-021-0/+1
| | | | | | | | | | | mii_phy_match() API and takes care of the PHY device probe based on the struct mii_phydesc array and the match return value provided. Convert PHY drivers to take advantage of mii_phy_dev_probe(), converting drivers to provide a mii_phydesc table in the first place where necessary. Reviewed by: yongari MFC after: 2 weeks
* - Add a MIIF_FORCEANEG flag which forces an auto-negotiation to alwaysmarius2006-11-271-0/+1
| | | | | | | | | | | | | | | take place if IFM_AUTO is selected. This allows drivers like nsphy(4), which need to force writing the ANAR according to the BMSR, to take advantage of mii_phy_setmedia(). [1] - In mii_phy_reset() once the current media is set don't isolate the PHY corresponding to the instance of the currently selected media rather than unconditionally not isolating the PHY corresponding to instance 0. This saves a isolation-unisolation-cycle of the PHY corresponding to the currently selected media for the case were it isn't instance 0. - Fix some whitespace nits. [1] Obtained from: NetBSD [1] MFC after: 2 weeks
* Introduce MII_ANEGTICKS and MII_ANEGTICKS_GIGE defines.oleg2006-05-161-0/+4
| | | | | | | (How many ticks should we wait before retrying autonegotiation process). Approved by: glebius (mentor) MFC after: 1 month
* Add a more generic version of the mii_phy_match routine (mii_phy_match_gen)imp2005-09-301-1/+4
| | | | | which can be used for phy that want to piggy back other data with their table.
* Add macros which follow the miidevs design pattern to make it easierimp2005-09-301-0/+3
| | | | to construct tables for mii_phy_match.
* Clean up mii/phy drivers: Remove the MIIF_DOINGAUTO which doesn't reallyphk2002-05-041-3/+1
| | | | | do anything at the end of the day except bloat the drivers which has copy&pasted it.
* Introduce NetBSD's mii_phy_match() API and use it in the nsgphy tophk2002-04-291-0/+11
| | | | get a description printed.
* Make one generic mii_phy_detach() to replace 19 slightly different ones.phk2002-04-291-1/+3
| | | | | | | 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.
* Move a lot closer to NetBSDs MII support for GigE.phk2002-04-291-0/+1
| | | | Move fxp and nge drivers over to use the new stuff.
* Moving closer to being able to use NetBSD's generic mii_set_media()phk2002-04-291-2/+34
| | | | function.
* Edging ever closer to NetBSD...phk2002-04-291-6/+5
|
* Don't pass three args when one will do just fine, and even preventphk2002-04-281-1/+1
| | | | mistakes like the one brgphy.c (now corrected).
* Remove __P.alfred2002-03-201-21/+20
|
* Add field for last active status, as well as function prototypes.jlemon2001-09-291-0/+3
|
* Grrrrr. That last commit was supposed to be to the head, not to -stablewpaul2000-12-121-0/+2
| | | | | | (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*
* Back out the previous change to the queue(3) interface.jake2000-05-261-2/+2
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-2/+2
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-2/+2
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* This commit adds support for the NetBSD MII abstraction layer andwpaul1999-08-211-0/+178
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.
OpenPOWER on IntegriCloud