summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/rgephy.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a copy/paste errorkevlo2008-08-061-1/+0
|
* Add RTL8211C(L) support.yongari2008-07-021-1/+13
| | | | | | | Disable advanced link-down power saving in phy reset. Reported by: nork Tested by: nork
* Add detection of isolation state.yongari2008-03-051-0/+5
| | | | PR: kern/76710
* Setting sc->mii_anegticks to MII_ANEGTICKS_GIGE in rgephy_attach()yongari2007-10-301-1/+0
| | | | | | is redundant. mii_phy_add_media() already takes care of that. Pointed out by: marius
* Add support for RealTek RTL8211B(L) PHY. It's based on the patchyongari2007-10-291-27/+87
| | | | | | | | | | | | | | | | | | | made by Michael Eisele and the patch was slightly modified by me. With this change several NVIDIA ethernet controllers(e.g. MCP61) works. RTL8211B(L) is RealTek's new gigabit PHY. The PHY has several features including crossover correction, polarity correction as well as supporting triple speed(10/100/1000bps). Data transfer between MAC and PHY is via RGMII for 1000baseT, MII for 10baseT/100baseTX. Unfortunately, RealTek used the same model number for RTL8211B(L) PHY so there is no way to discriminate between RTL8211B(L) and its predecessors. ATM RTL8211B uses revision number 2 so checking the revision number seems to be only way to identify it. Obtained from: Michael Eisele [1] Tested by: clemens fischer < ino-qc AT spotteswoode DOT de DOT eu DOT org >
* o RTL8169S/8110S integrated PHY and RTL8211B are gigabit PHYs so setyongari2007-10-291-7/+14
| | | | | | | | | | | mii_anegticks to MII_ANEGTICKS_GIGE and use it. Previously it used to MII_ANEGTICKS which may not be enough to wait before retrying autonegotiation process at 1000bps. o Reset autonegotation timer if media option is not IFM_AUTO or we got a valid link. o Announce link loss right after it happends. o Autonegiation is retried every mii_anegticks seconds. o Report link state changes right after setting autonegotiation.
* Correct the previous change:marius2006-12-181-0/+3
| | | | | | - If we want mii_phy_add_media() to add 1000baseT media, we need to supply sc->mii_extcapabilities. - Fix formatting when announcing autonegotiation support.
* - Don't set MIIF_NOISOLATE so rgephy(4) can be used in configurationsmarius2006-12-021-13/+3
| | | | | | | | | | | with multiple PHYs and un-comment case IFM_NONE in case MII_MEDIACHG rgephy_service(). There doesn't seem to be a problem with isolating RTL8169S and their internal PHY. - Take advantage of mii_phy_add_media(). [1] Obtained from: NetBSD [1] Tested by: yongari MFC after: 2 weeks
* Some style changes to a couple of PHY drivers:marius2006-12-021-18/+9
| | | | | | | | | | | | | - Fix some whitespace nits. - Fix some spelling in comments. - Use MII_ANEGTICKS instead of 5. - Don't define variables in nested scope. - Remove superfluous returns at the end of void functions. - Remove unused static global rgephy_mii_model. - Remove dupe $Id$ in tdkphy(4). - Sort brgphys table. MFC after: 2 weeks
* Add a helper function mii_phy_dev_probe(), which wraps around themarius2006-12-021-10/+6
| | | | | | | | | | | 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
* Due to the poor PHY documentation from RealTek I can't sure but Iyongari2006-08-121-10/+18
| | | | | | | | | | think the RealTek PHY needs driver to set RGEPHY_BMCR_AUTOEN bit of RGEPHY_MII_BMCR register and proper ANAR register setting for manual media type selection. This fixes long standing manual media type selection bug in rgephy(4). Reported by: Jelte Jansen <jelte AT NLnetLabs DOT nl> Tested by: Jelte Jansen <jelte AT NLnetLabs DOT nl>
* Replace hard-coded magic constants to system defined constantsyongari2006-07-031-1/+1
| | | | | | | (BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). There is no functional changes. Reviewed by: oleg, scottl
* Add support for the RealTek 8169SC/8110SC and RTL8101E devices. Thewpaul2006-06-261-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | latter is a PCIe 10/100 chip. Finally fix the EEPROM reading code so that we can access the EEPROMs on all devices. In order to access the EEPROM, we must select 'EEPROM programming' mode, and then set the EEPROM chip select bit. Previously, we were setting both bits simultaneously, which doesn't work: they must be set in the right sequence. Always obtain the station address from the EEPROM, now that EEPROM reading works correctly. Make the TX interrupt moderation code based on the internal timer optional and turned off by default. Make the re_diag() routine conditional and off by default. When it is on, only use it for the original 8169, which was the only device that that really needed it. Modify interrupt handling to use a fast interrupt handler and fast taskqeueue. Correct the rgephy driver so that it only applies the DSP fixup for PHY revs 0 and 1. Later chips are fixed and don't need the fixup. Make the rgephy driver advertise both 1000_FD and 1000_HD bits in autoneg mode. A couple of the devices don't autoneg correctly unless configured this way.
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* Use ansi function definitions in preference to K&R to reduce diffsimp2005-09-301-12/+5
| | | | with NetBSD (and cause it looks cooler).
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-301-0/+1
| | | | one on death-row in <sys/kernel.h>
* Remove double __FBSDID and move the remaining one into a common place aftermarius2004-05-291-3/+3
| | | | | the license(s) and before the driver comment (the latter only in drivers not having __FBSDID at that location).
* Correct the phy_service() routine case MII_TICK to correctly trackandre2004-05-031-3/+3
| | | | | | | | | | the falling edge of a media state change. This is in preparation for media state change notification to the routing socket. No objections by: sam, wpaul, ru, bms Brucification by: bde
* Clean up dead code.wpaul2003-09-111-15/+8
|
* Add a PHY driver to support the built-in gigE PHY in the 8169S/8110Swpaul2003-09-111-0/+483
ethernet chips. This driver is pretty simple, however it contains special DSP initialization code which is needed in order to get the chip to negotiate a gigE link. (This special initialization may not be needed in subsequent chip revs.) Also: - Fix typo in if_rlreg.h (RL_GMEDIASTAT_1000MPS -> RL_GMEDIASTAT_1000MBPS) - Deal with shared interrupts in re_intr(): if interface isn't up, return. - Fix another bug in re_gmii_writereg() (properly apply data field mask) - Allow PHY driver to read the RL_GMEDIASTAT register via the re_gmii_readreg() register (this is register needed to determine real time link/media status).
OpenPOWER on IntegriCloud