summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii
Commit message (Collapse)AuthorAgeFilesLines
...
* - Add another Altima PHY, which is a AC101 workalike and integratedmarius2006-12-021-1/+3
| | | | | | | | | | | in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Add Davicom DM9102 PHY. - Add DM9101 to the description of AMD 79C873 as at least some Davicom DM9101F identify identical to AMD 79C873. Obtained from: NetBSD MFC after: 2 weeks
* - Don't set MIIF_NOISOLATE so tdkphy(4) can be used in configurationsmarius2006-12-021-37/+9
| | | | | | | | | | | | | | | | | with multiple PHYs. There doesn't seem to be a problem with isolating 78Q2120 per se nor in combination with the NICs they're used with and tdkphy(4) was already adding IFM_NONE anyway. - Set MIIF_NOLOOP as loopback doesn't work with this PHY. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). Thanks to Hans-Joerg Sirtl for lending me test hardware. Obtained from: NetBSD tqphy(4) MFC after: 2 weeks
* - 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-027-94/+53
| | | | | | | | | | | | | - 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-0219-249/+135
| | | | | | | | | | | 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
* - In rlphy_service() for the MII_TICK case don't bother to check whethermarius2006-11-281-45/+10
| | | | | | | | | | | | | | the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - In rlphy_status() just use if_dname instead of determining the name of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)). - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix some whitespace nits and remove commented out code that just can't be used with RealTek PHYs. MFC after: 2 weeks
* - In qsphy_service() for the MII_TICK case don't bother to check whethermarius2006-11-281-29/+4
| | | | | | | | | | | | | | the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Don't set MIIF_NOISOLATE so qsphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating QS6612 per se nor in combination with the NICs they're used with. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). Obtained from: NetBSD (except for the first item) MFC after: 2 weeks
* - Don't add IFM_NONE when used in combination with pcn(4) as for MIImarius2006-11-281-49/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loopback to work PCnet chips additionally need to be placed into external loopback mode which pcn(4) doesn't do so far. - In nsphy_service() just use if_dname instead of determining the name of the parent NIC via device_get_name(device_get_parent(sc->mii_dev)). - Don't set MIIF_NOISOLATE, except for when used in combination with a NIC that wedges when isolating the PHYs, so nsphy(4) can be used in configurations with multiple PHYs. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia() (requires the MIIF_FORCEANEG added in sys/dev/mii/mii_physubr.c 1.26, sys/dev/mii/miivar.h 1.19). - Implement a separate nsphy_reset(). There are two reasons for this: 1) This PHY can take an inordinate amount of time to reset if media is attached; under fairly normal circumstances up to nearly one second. This is because it appears to go through an implicit auto- negotiation cycle as part of the reset. 2) During reset and auto-negotiation, the BMCR will clear the reset bit before the process is complete. It will return 0 until the process is complete and it's safe to access the PHY again. This is the first of two changes required to make the combination of Am79c971 and DP83840A found on certain HP cards and on-board in IBM machines work. - Fix some whitespace nits. Based on: NetBSD (except for the first and second item) MFC after: 2 weeks
* - Rely on mii_phy_add_media() setting mii_anegticks as appropriate.marius2006-11-281-4/+3
| | | | | | - Fix some whitespace nits. MFC after: 2 weeks
* - Don't set MIIF_NOISOLATE so lxtphy(4) can be used in configurationsmarius2006-11-281-35/+8
| | | | | | | | | | | | | with multiple PHYs. There doesn't seem to be a problem with isolating LXT970 per se nor in combination with the NICs they're used with and lxtphy(4) was already adding IFM_NONE anyway. - Use mii_phy_add_media() instead of mii_add_media() so the latter can be eventually retired. - Take advantage of mii_phy_setmedia(). - Fix some whitespace nits. Obtained from: NetBSD MFC after: 2 weeks
* - Remove a dupe $FreeBSD$.marius2006-11-281-10/+8
| | | | - Fix some whitespace nits.
* Analogous to mii_add_media(), factor out the code for checking whethermarius2006-11-273-10/+8
| | | | | | | | 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 a MIIF_FORCEANEG flag which forces an auto-negotiation to alwaysmarius2006-11-272-4/+11
| | | | | | | | | | | | | | | 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
* Add PHY support for BCM5752.yongari2006-08-311-0/+2
| | | | Tested by: delphij, Ganbold < ganbold AT micom DOT mng DOT net >
* Add Broadcom BCM5752 PHY id.yongari2006-08-311-0/+1
|
* Pack several boolean fields into single bge_flags field.glebius2006-08-231-1/+1
|
* 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>
* Add ip1000 PHY driver for IC Plus IP1000A integrated PHY.yongari2006-07-252-0/+585
|
* Add IC Plus IP1000A integrated PHY id.yongari2006-07-251-0/+4
|
* Add gentbi, a generic TBI(teb-bit interface) PHY driver portedyongari2006-07-251-0/+314
| | | | from NetBSD.
* Reset autonegotiation timer if current media is not 'auto'.oleg2006-07-031-1/+3
| | | | | Approved by: glebius (mentor) MFC after: 2 weeks
* Use mii_phy_match to reduce duplicated code.yongari2006-07-031-71/+21
| | | | Reviewed by: glebius
* Replace hard-coded magic constants to system defined constantsyongari2006-07-0321-43/+43
| | | | | | | (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.
* If the PHY has 1000BASE-T capability, check to see if a 1000BASE-T speedyongari2006-05-191-2/+15
| | | | | | was negotiated. Obtained from: NetBSD
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-166-6/+0
| | | | unnecessary.
* 1) Fix mii_phy_tick():oleg2006-05-161-18/+18
| | | | | | | | | | | | | | Current code does not report link loss correctly - when link goes down, mii_phy_tick() will notice that with up to mii_anegticks delay. If link goes up during this delay then link flapping will be unnoticed by driver. 2) mii_phy_add_media(): initialize sc->mii_anegticks for 10/100 media 3) Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE defines instead of hardcoded values. Approved by: glebius (mentor) MFC after: 1 month
* 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
* Fix the PHY support for the 5780. I mis-merged this from my sources.ps2006-04-121-0/+1
|
* Add a driver for the Broadcom NetXtreme II (BCM5706/BCM5708)ps2006-04-102-26/+84
| | | | | | PCI/PCIe Gigabit Ethernet adapeter. Submitted by: David Christensen
* Add basic support for BCM5780 PHY.oleg2006-03-232-0/+8
| | | | | | Submitted by: grehan Approved by: glebius (mentor) MFC after: 1 week
* - Introduce ifmedia_baudrate(), which returns correct baudrate of theglebius2006-02-141-0/+11
| | | | | | | given media status. [1] - Utilize ifmedia_baudrate() in miibus_statchg() to update ifp->if_baudrate. Obtained from: NetBSD [1]
* 1) fix tiny bug in bge_start_locked()oleg2005-12-081-1/+1
| | | | | | | | | | | | | 2) rework link state detection code & use it in POLLING mode 3) fix 2 bugs in link state detection code: a) driver unable to detect link loss on bcm5721 b) on bcm570x chips (tested on bcm5700 bcm5701 bcm5702) driver fails to detect link loss with probability 1/6 (solved in brgphy.c) Devices working in TBI mode should not be affected by this change. Approved by: glebius (mentor) MFC after: 1 month
* Remove dc-only pseudo phy devices after repo copy to dev/dcimp2005-10-182-719/+0
|
* The BCM5401 dspcode load on media changes also appliesgrehan2005-10-161-0/+2
| | | | | | | | to the 100/1000 BCM5400 phy. This fixes the problem with the GEM port not syncing up on Sawtooth G4's. Obtained from: NetBSD Reported by: Ben Rosengart <ben + freebsd org at narcissus net>
* Use ansi function definitions in preference to K&R to reduce diffsimp2005-09-3016-176/+72
| | | | with NetBSD (and cause it looks cooler).
* Not sporttings on other cardsimp2005-09-301-3/+3
|
* Add a more generic version of the mii_phy_match routine (mii_phy_match_gen)imp2005-09-302-3/+14
| | | | | 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-302-8/+6
| | | | to construct tables for mii_phy_match.
* Add an evil hack to work around a cast from the softc to the ifnet thatbrooks2005-06-111-4/+6
| | | | | | I missed. Since I did no rearrange any softcs, casting the result of device_get_softc() to (struct ifnet **) and derefrencing it yeilds a pointer to the ifp. This makes at least vr(4) nics work.
* Remove bus_{mem,p}io.h and related code for a micro-optimization on i386nyan2005-05-292-4/+0
| | | | | | and amd64. The optimization is a trivial on recent machines. Reviewed by: -arch (imp, marcel, dfr)
* Support the 5714Cps2005-05-192-0/+8
| | | | Submitted by: John Cagle <john dot cagle at hp dot com>
* On second though, print the OUI, model and revision. This is the sameimp2005-02-161-1/+3
| | | | | information that's in the id1 and id2 fields we were using, but is in a form that the drivers will be using in their matching routines.
* Add location and PNP info to the mii busimp2005-02-161-0/+24
|
* Use ANSI function definitions, in preference to the K&R definitions.imp2005-02-152-34/+15
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-0631-32/+31
|
* Cleanup link state change notification:sam2004-12-081-28/+11
| | | | | o add new if_link_state_change routine that deals with link state changes o change mii to use if_link_state_change
* With mii.h rev 1.4 changes to BMSR_MEDIAMASK merged in frombz2004-11-261-2/+2
| | | | | | | | | | | | | | | | | NetBSD got activated. NetBSD has an additional change in their mii.c rev 1.26 which got missed with that merger: : When probing for a PHY, look at the EXTSTAT bit in the BMSR, as well, : not just the media mask. This prevents PHYs/TBIs that only support : Gigabit media from slipping through the cracks. With this GE only ones like from the SK-9844 are detected again. PR: i386/63313, i386/71733, kern/73725 Tested by: matt baker <matt at sevenone dot com>, Jin Guojun <jin at george dot lbl dot gov> Approved by: rwatson (mentor) Obtained from: NetBSD mii.c rev 1.26 MFC after: 1 week
* Add support for the BCM5750/5751. Unfortunately the documentationps2004-09-242-0/+34
| | | | | | | | I have from Broadcom does not give much information on these devices, so the Broadcom Linux driver was used for clues to what these chips support. It turns out they are similar to the 5705 with the 5751 being the PCI-Express version and needing special work-arounds and settings.
* Add device driver support for the VIA Networking Technologieswpaul2004-09-103-0/+790
| | | | | | | | | | | | VT6122 gigabit ethernet chip and integrated 10/100/1000 copper PHY. The vge driver has been added to GENERIC for i386, pc98 and amd64, but not to sparc or ia64 since I don't have the ability to test it there. The vge(4) driver supports VLANs, checksum offload and jumbo frames. Also added the lge(4) and nge(4) drivers to GENERIC for i386 and pc98 since I was in the neighborhood. There's no reason to leave them out anymore.
OpenPOWER on IntegriCloud