summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/atphy.c
Commit message (Collapse)AuthorAgeFilesLines
* - Masking IFM_GMASK when also masking IFM_FDX is redundant and justmarius2011-01-141-8/+8
| | | | | | | | | | | | complicates the code. - Don't let atphy_setmedia() announce PAUSE support for half-duplex when MIIF_FORCEPAUSE is set. - Simplify e1000phy_service() and ip1000phy_service() to only set the manual configuration bits once after we have figured them all out. For ip1000phy_service() this also means we no longer unnecessarily update the hardware along the road. MFC after: 1 week
* Fix a bug introduced with r215298; when atphy_reset() is called frommarius2010-11-181-1/+2
| | | | | | | atphy_attach() the current media has not been set, yet, leading to a NULL-dereference in atphy_setmedia(). Submitted by: jkim (initial version)
* - Change these drivers to take advantage and use the generic IEEE 802.3marius2010-11-141-14/+22
| | | | | | | | | | | | | | 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
* - In the spirit of previous simplifications factor out the checks for amarius2010-10-021-26/+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.
* Add F1 PHY found on Atheros AR8151 v2.0 PCIe gigabit ethernetyongari2010-08-091-0/+1
| | | | controller.
* Use auto-negotiation for manual media type selection. This fixesyongari2008-10-251-1/+2
| | | | establishment of 10/100Mbps link on Atheros AR8121(L1E).
* - Add driver for Attansic L2 FastEthernet controller found onstas2008-10-031-0/+1
| | | | | | | | | Asus EeePC and some Asus mainboards. Reviewed by: yongari, rpaulo, jhb Tested by: many Approved by: kib (mentor) MFC after: 1 week
* Add Attansic/Atheros F1 PHY driver.yongari2008-05-191-0/+413
OpenPOWER on IntegriCloud