summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii
Commit message (Collapse)AuthorAgeFilesLines
* Add icsphy(4), Integrated Circuit Systems PHY driver, ported fromyongari2007-06-112-0/+438
| | | | | | | NetBSD. ATM the only consumer of the PHY is XBox with nfe(4) driver. Submitted by: Ed Schouten <ed@fxq.nl> Tested by: Ed Schouten <ed@fxq.nl>
* Add ICS1889/ICS1892/ICS1893 PHY.yongari2007-06-111-0/+3
| | | | Submitted by: Ed Schouten <ed@fxq.nl>
* - Fixed a problem that caused autonegotiation failures.davidch2007-06-081-1/+5
| | | | | Submitted by: tor.egge@cvsup.no.freebsd.org MFC after: 4 weeks
* New features:davidch2007-06-073-179/+497
| | | | | | | | | | | | | - Moved BCM5706S/5708S SerDes support to brgphy (since they are not technically TBI interfaces) - Added 2.5G support for BCM5708S Comments: Since this driver is shared with bge I tested several available controllers supported by bge and all worked as expected, however the list was not exhaustive. Need wider testing. MFC after: 4 weeks
* Add support IC Plus IP101 10/100 PHY that is found on nVidia networkyongari2007-06-061-0/+1
| | | | | | adapters. Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp >
* Add IC Plus IP101 PHYyongari2007-06-061-0/+1
|
* Add support Vitesse VSC8601 PHY that is found on nVidia networkyongari2007-06-062-0/+30
| | | | | | | | adapters. Submitted by: Shigeaki Tagashira < shigeaki AT se DOT hiroshima-u DOT ac DOT jp > Tested by: Yuri Pankov < yuri.pankov AT gmail DOT com>, Rainer Hurling <rhurlin AT gwdg DOT de >
* Add OUI for Vitesse Semiconductor.yongari2007-06-061-0/+2
| | | | Add Vitesse VSC8601 PHY.
* Define the miibus ivars as a structure, instead of as a vector ofmarcel2007-05-011-14/+15
| | | | | | pointers. A structure is more readable and less error-prone. It also avoids problems when a function pointer doesn't have the same width as a void pointer.
* - Take advantage of mii_phy_add_media() for adding media and settingmarius2007-04-301-65/+13
| | | | | | | | | | | | | | | | | | | | sc->mii_anegticks according to whether the respective BGE chip supports Fast Ethernet only or also Gigabit Ethernet. - At least the BGE chips I've tested with wedge when isolating them so document this as the reason for setting MIIF_NOISOLATE and remove the unused (and partially even #ifdef'ed out) isolation related code. Add code that panics if we encounter a non-zero MII instance as generally there's no way a PHY requiring MIIF_NOISOLATE can be handled gracefully in a multi-PHY configuration (it's ok for the internal PHY of single-PHY-only-NIC to not support isolation though). - Additionally set MIIF_NOLOOP as loopback doesn't seem to work either and remove the #ifdef'ed out code for adding respective media. The MIIF_NOLOOP flag currently triggers nothing but hopefully will be respected by mii_phy_setmedia() later on. Reviewed by: jkim, yongari MFC after: 1 month
* Let brgphy(4) attach for the Broadcom BCM5755 ASIC based chipsetsmarius2007-04-102-0/+2
| | | | | | | as well. Obtained from: OpenBSD MFC after: 1 week
* Revert couple of changes from 1.51 and 1.52. Reading link status with BMSRjkim2007-03-191-14/+12
| | | | | | | is okay for most of the chipsets but BCM5701 PHY does not seem to like it. Set media to IFM_NONE if link is not up instead of the previous value. Reported by: Goran Lowkrantz (goran dot lowkrantz at ismobile dot com)
* mii_phy_dev_probe returns its third argument on match, not 0, so pass 0imp2007-02-261-1/+1
| | | | | | in if we're going to test against 0. Noticed by: marius@
* Restore support for the 5706C bce(4) phy that was broken during thejhb2007-02-212-2/+54
| | | | | | | | | | | | | addition of SerDes support. According to the docs, the 5706C and 5708C phys are supposed to use the same MII model that is separate from the SerDes parts, but the 5706C actually uses the MII model of the SerDes parts. To fix this, readd the old 5706C entry to miidevs and add a special check in brgphy_probe() for phys that match the 5706C ID. If the phy is supported by the gentbi(4) driver, then it's a SerDes phy, so we fail the probe and let gentbi(4) grab it. Otherwise, it's a 5706C phy, so we let brgphy(4) grab it. In coordination with: dwhite
* Fix a typo from the previous commit.jkim2007-02-141-1/+1
| | | | Pointed out by: brad@openbsd.org
* Fix typos in comments while I am here.jkim2007-02-132-28/+29
|
* Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.jkim2007-02-121-0/+22
|
* Fix style(9).jkim2007-02-122-236/+236
| | | | Pointed out by: many
* Add PHY DSP code for BCM5755M.jkim2007-02-122-0/+27
| | | | Obtained from: OpenBSD
* BCM5701 PHY cannot read-modify-write. Just re-use the magic number from DSPjkim2007-02-121-4/+9
| | | | init code.
* Replace magic numbers with corresponding definitions.jkim2007-02-121-8/+8
|
* Fix problem with RTL8201L PHY. From submitter:imp2007-02-081-2/+17
| | | | | | | | | | | | | | | | | | | | | | | Bugfix for the Realtek PHY driver... an RTL8201L standalone PHY needs different handling than the integrated ones in terms of speed detection. There was a bogus test based on the parent device driver name string controlling which speed register to query. That test began failing when the rl driver was split into separate rl and re drivers some time ago. Apparently nobody ever noticed because the buggy code only executes if NWAY negotiation failed. Since we happen to be testing with an ancient dumb hub rather than a modern switch, we found it. To fix it all, have the attach() routine notice whether we're dealing with an integrated PHY or an RTL8201L and store that info in a struct accessible to the status() routine that needs to know which register to query. I touched up the fixes because they were relative to RELENG_6 and to bring a few nits into line with style(9). MFC After: 2 weeks Submitted by: Ian Lepore
* Add missing MIIBUS_MEDIAINIT() call.dwhite2007-01-261-0/+1
|
* Collapse 5706C and 5708C PHYs into one entry. ID 0x15 is actually used fordwhite2007-01-262-3/+1
| | | | the SERDES PHY on these chips and we want gentbi to pick this up, not brgphy.
* Correct a logic bug in the previous change.marius2007-01-211-1/+1
|
* - In miibus_attach() remove IFM_IMASK from the dontcare_mask of themarius2007-01-201-2/+17
| | | | | | | | | | | | | | | | ifmedia_init() invocation. IFM_IMASK makes only sense here when all of the maxium of 32 PHYs on each one MII bus support disjoint sets of media, which generally isn't the case (though it would be nice if we had a way to let NIC drivers indicate that for the few card models where the PHY configuration is known/fixed and IFM_IMASK actually makes sense). - Add and use a miibus_print_child() for the bus_print_child method which additionally prints the PHY number (which actually is the PHY address) so one can figure out the media instance <-> PHY number mapping from the PHY driver attach output. This is intented to be usefull in situations where the addresses of the PHYs on the bus are known (f.e. of internal/ integrated PHYs) so one can feed the appropriate media instance number to ifconfig(8) (with the upcoming change for ifconfig(8)). This is more or less inspired by the NetBSD mii_print().
* - Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations withmarius2007-01-201-3/+1
| | | | | | | | | multiple PHYs. In case some PHYs currently driven by ukphy(4) exhibit problems when isolating due to incomplete implementations or silicon bugs we'll need to add specific drivers for these. Looking at NetBSD and OpenBSD I don't expect problems here though (quite the contrary; we still seem to set MIIF_NOISOLATE without good reason in a bunch of PHY drivers). - Fix a style(9) whitespace nit.
* Correct driver_t brgphy_driver, which was forgotten from the last commit.jkim2007-01-161-1/+1
|
* Move MII model and revision into softc.jkim2007-01-161-14/+24
|
* - Move Ethernet@WireSpeed and jumbo frame configurations to separatejkim2007-01-151-48/+60
| | | | | | | functions. The idea is taken from OpenBSD. - Set/clear jumbo frame configurations for bge(4). - Re-add BCM5750 PHY workaround for bce(4), which was mistakenly removed from the previous commit.
* - Fix BCM5754 support found in Dell PowerEdge SC440.jkim2007-01-152-22/+49
| | | | | | | | | | | - Move some PHY bug detections from brgphy.c to if_bge.c. - Do not penalize working PHYs. - Re-arrange bge_flags roughly by their categories. - Fix minor style(9) nits. PR: kern/107257 Obtained from: OpenBSD Tested by: Mike Hibler <mike at flux dot utah dot edu>
* After another thought there is another nail for the mii_phy_dev_probe()-marius2007-01-131-19/+12
| | | | hammer.
* Remove mii_media_from_bmcr(); all previous users have been converted tomarius2007-01-132-20/+0
| | | | use mii_phy_add_media()/mii_phy_setmedia().
* - Take advantage of mii_phy_dev_probe() and mii_phy_setmedia().marius2007-01-131-52/+22
| | | | | | | | | | | - 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_ANEGTICKS instead of 5. - Remove an unused macro. - Fix some whitespace nits. MFC after: 1 week
* - Take advantage of mii_phy_dev_probe().marius2007-01-121-39/+19
| | | | | | | | | | - In exphy_service() for the MII_TICK case don't bother to check whether the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Remove #if 0'ed unapplicable code. - Fix some whitespace nits. MFC after: 1 week
* Set MIIF_HAVE_FIBER and add IFM_100_FX media when the AC_MCTL_FX_SELmarius2007-01-121-0/+13
| | | | | | | | | and thus the FX_DIS pin indicates fibre media. This is part 1/2 of adding support for the 100baseFX interface/port of AT-2700 series adaptors. Idea from: NetBSD MFC after: 1 week
* - Correct the AC_MCTL_BYP_PCS constant.marius2007-01-121-14/+14
| | | | - Correct whitespace nits (use #define<tab>, remove trailing whitespace).
* Use mii_phy_add_media()/mii_phy_setmedia()-compatible media tablemarius2007-01-126-7/+7
| | | | | | indices when manually adding media. Some of these I've missed while converting drivers to take advantage of said fuctions recently, others where longstanding bugs.
* MFp4: add basic driver for RTL8305SC switch in PHY emulationticso2007-01-052-0/+426
|
* Use BMSR for link status in one more place and clean up more.jkim2006-12-201-10/+9
|
* - Do not depend on auto negotiation for link speed/duplex status.jkim2006-12-201-68/+81
| | | | | - Read link status from BMSR instead of auxilary status register. - Clean up style(9) nits.
* - Fix autonegotiation timer.oleg2006-12-191-30/+22
| | | | | | | | - Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE defines instead of hardcoded value. - Fix some comments. - style(9) MFC after: 2 month
* 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.
* o Add support code for newer Marvell PHYs.yongari2006-12-111-127/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Remove unused static global variable e1000phy_debug. o Take advantage of mii_phy_dev_probe(). o Use MII_ANEGTICKS/MII_ANEGTICKS_GIGE instead of magic number 5. o Add IFM_NONE as e1000phy(4) supports it without issues. o Nuke magic PHY programming sequence in PHY reset and follow correct reset sequence. [1] o Make manual media selection work for all supported media types. o Don't set MIIF_NOISOLATE so e1000phy(4) can be used in configurations with multiple PHYs. o In 1000baseT, when setting the link manually, one side must be the master and the other the slave. If LINK0 is set, program the PHY to be a master, otherwise it's a slave. o When we lost a link, reset mii_ticks immediately so it correctly check number of seconds elapsed in autonegotiation phase. o Announce link loss right after it happens. o After kicking autonegotiation, report PHY status instead of returning immediatly. o When link state check is in progress, check auto negotiation completion bit only when auto negotiation is enbaled. o When PHY is resolved to a master, show it with IFM_FLAG2. Special thanks to marius who fixed several nits in original patch. In half-duplex mode, nfe(4) fails to send packets. I think it's a bug in nfe(4) as the same PHY works without problems on msk(4). Obtained from: em(4) [1] Reviewed by: marius Tested by: bz
* Add additional Marvell PHY registers.yongari2006-12-111-0/+10
|
* Add a bunch of new Marvell PHY ids.yongari2006-12-111-0/+14
|
* style(9)yongari2006-12-111-5/+4
|
* Teach the brgphy about some new Broadcom IDs.scottl2006-12-112-0/+3
| | | | | Submitted by: David Christenson Sponsored by: www.UIA.net
* - Probe Davicom DM9102 PHYs.marius2006-12-021-30/+8
| | | | | | | | | | | | | | - Don't set MIIF_NOISOLATE so amphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AM79c873 and workalikes per se nor in combination with the NICs they're used with and amphy(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 a whitespace nit. Obtained from: NetBSD dmphy(4) (except for the last item) MFC after: 2 weeks
* - In acphy_service() for the MII_TICK case don't bother to check whethermarius2006-12-021-30/+7
| | | | | | | | | | | | | | | | | | | the currently selected media is of type IFM_AUTO as auto-negotiation doesn't need to be kicked anyway. - Fix a whitespace nit. - Probe another Altima PHY, which is a AC101 workalike and integrated in at least ADMtek ADM8511 but apparently is not mentioned in any publically available data sheet so the actual identifier is unknown. - Don't set MIIF_NOISOLATE so acphy(4) can be used in configurations with multiple PHYs. There doesn't seem to be a problem with isolating AC101 and workalikes 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 and second item) MFC after: 2 weeks
OpenPOWER on IntegriCloud