summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/gentbi.c
Commit message (Collapse)AuthorAgeFilesLines
* Given that unlike f.e. rgephy(4) these drivers doen't explicitly start anmarius2010-11-221-0/+2
| | | | | | | autonegotiation along with manual media selection and also only report flow control status when BMCR_AUTOEN is set (at least with gentbi(4) determining the flow control status results in false-positives when not set), use MIIF_NOMANPAUSE.
* - Change these drivers to take advantage and use the generic IEEE 802.3marius2010-11-141-1/+2
| | | | | | | | | | | | | | annex 31B full duplex flow control as well as the IFM_1000_T master support committed in r215297. For atphy(4) and jmphy(4) this includes changing these PHY drivers to no longer unconditionally advertise support for flow control but only if the selected media has IFM_FLOW set (or MIIF_FORCEPAUSE is set). - Rename {atphy,jmphy}_auto() to {atphy,jmphy}_setmedia() as these handle other media types as well. Reviewed by: yongari (plus additional testing) Obtained from: NetBSD (partially), OpenBSD (partially) MFC after: 2 weeks
* Convert the PHY drivers to honor the mii_flags passed down and convertmarius2010-10-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | the NIC drivers as well as the PHY drivers to take advantage of the mii_attach() introduced in r213878 to get rid of certain hacks. For the most part these were: - Artificially limiting miibus_{read,write}reg methods to certain PHY addresses; we now let mii_attach() only probe the PHY at the desired address(es) instead. - PHY drivers setting MIIF_* flags based on the NIC driver they hang off from, partly even based on grabbing and using the softc of the parent; we now pass these flags down from the NIC to the PHY drivers via mii_attach(). This got us rid of all such hacks except those of brgphy() in combination with bce(4) and bge(4), which is way beyond what can be expressed with simple flags. While at it, I took the opportunity to change the NIC drivers to pass up the error returned by mii_attach() (previously by mii_phy_probe()) and unify the error message used in this case where and as appropriate as mii_attach() actually can fail for a number of reasons, not just because of no PHY(s) being present at the expected address(es). Reviewed by: jhb, yongari
* Consistently always explicitly set IFM_HDX for half-duplex.marius2010-10-031-1/+2
| | | | Obtained from: OpenBSD (mostly)
* - In the spirit of previous simplifications factor out the checks for amarius2010-10-021-27/+2
| | | | | | | | | | | | | | | | | different PHY instance being selected and isolation out into the wrappers around the service methods rather than duplicating them over and over again (besides, a PHY driver shouldn't need to care about which instance it actually is). - Centralize the check for the need to isolate a non-zero PHY instance not supporting isolation in mii_mediachg() and just ignore it rather than panicing, which should sufficient given that a) things are likely to just work anyway if one doesn't plug in more than one port at a time and b) refusing to attach in this case just leaves us in a unknown but most likely also not exactly correct configuration (besides several drivers setting MIIF_NOISOLATE didn't care about these anyway, probably due to setting this flag for no real reason). - Minor fixes like removing unnecessary setting of sc->mii_anegticks, using sc->mii_anegticks instead of hardcoded values etc.
* Use the mii_data provided via mii_attach_args and mii_pdata respectivelymarius2010-09-271-1/+1
| | | | instead of reaching out for the softc of the parent.
* - Remove clause 3 and 4 from TNF licenses.marius2010-09-261-12/+0
| | | | | | - Remove closes 3 & 4 from Manuel Bouyer's license. Obtained from: NetBSD
* - Remove MIIF_NOISOLATE; there's generally no reason to let gentbi(4)marius2007-10-291-2/+1
| | | | | | | | | | set this flag and it was more or less just copied and pasted from another FreeBSD driver while porting this driver from NetBSD, whose gentbi(4) doesn't set MIIF_NOISOLATE either. - Fix spelling in a comment. OK'ed by: yongari MFC after: 3 months
* Add missing MIIBUS_MEDIAINIT() call.dwhite2007-01-261-0/+1
|
* Analogous to mii_add_media(), factor out the code for checking whethermarius2006-11-271-5/+1
| | | | | | | | the BMSR contains any media at all to mii_phy_add_media(). The majority of the drivers currently using mii_phy_add_media() were missing such a check anyway though. MFC after: 2 weeks
* Add gentbi, a generic TBI(teb-bit interface) PHY driver portedyongari2006-07-251-0/+314
from NetBSD.
OpenPOWER on IntegriCloud