summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii/brgphy.c
Commit message (Collapse)AuthorAgeFilesLines
* - 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-071-164/+388
| | | | | | | | | | | | | - 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
* - 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-101-0/+1
| | | | | | | 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)
* Restore support for the 5706C bce(4) phy that was broken during thejhb2007-02-211-1/+52
| | | | | | | | | | | | | 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-131-3/+4
|
* Add BCM5701 A0/B0 CRC bug workaround. Magic values taken from Linux driver.jkim2007-02-121-0/+22
|
* Fix style(9).jkim2007-02-121-14/+14
| | | | Pointed out by: many
* Add PHY DSP code for BCM5755M.jkim2007-02-121-0/+23
| | | | 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
|
* Collapse 5706C and 5708C PHYs into one entry. ID 0x15 is actually used fordwhite2007-01-261-1/+0
| | | | the SERDES PHY on these chips and we want gentbi to pick this up, not brgphy.
* 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-151-22/+48
| | | | | | | | | | | - 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>
* 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
* Teach the brgphy about some new Broadcom IDs.scottl2006-12-111-0/+1
| | | | | Submitted by: David Christenson Sponsored by: www.UIA.net
* Some style changes to a couple of PHY drivers:marius2006-12-021-30/+22
| | | | | | | | | | | | | - 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/+1
| | | | | | | | | | | 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
* Add PHY support for BCM5752.yongari2006-08-311-0/+2
| | | | Tested by: delphij, Ganbold < ganbold AT micom DOT mng DOT net >
* Pack several boolean fields into single bge_flags field.glebius2006-08-231-1/+1
|
* 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-031-12/+12
| | | | | | | (BUS_PROBE_DEFAULT, BUS_PROBE_GENERIC etc). There is no functional changes. Reviewed by: oleg, scottl
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* 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-101-26/+82
| | | | | | PCI/PCIe Gigabit Ethernet adapeter. Submitted by: David Christensen
* Add basic support for BCM5780 PHY.oleg2006-03-231-0/+7
| | | | | | Submitted by: grehan Approved by: glebius (mentor) MFC after: 1 week
* 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
* 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-301-12/+5
| | | | with NetBSD (and cause it looks cooler).
* Support the 5714Cps2005-05-191-0/+7
| | | | Submitted by: John Cagle <john dot cagle at hp dot com>
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Add support for the BCM5750/5751. Unfortunately the documentationps2004-09-241-0/+33
| | | | | | | | 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 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/+0
| | | | | 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
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-10-311-2/+2
| | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname)
* Typo when setting wirespeed. || != |ps2003-09-281-1/+1
| | | | Found by: jake
* Use __FBSDID().obrien2003-08-241-0/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* On Dell boxes such as the PE2650 we need to disable 3 led mode for theambrisko2003-08-201-0/+7
| | | | | | | link LED to work. Reviewed by: wpaul Obtained from: Linux driver
* Add support for the Broadcom BCM5901 and BCM5901 rev A2 chips.wpaul2003-08-121-5/+25
| | | | | | | | These are 10/100 only NICs found on the IBM Thinkpad R40E and G40. These seem to be based on the BCM5705 MAC but with a PHY that doesn't support 1000Mbps modes. Submitted by: Igor Sviridov <sia@nest.org>
* Add support for the BCM5705 and its ilk. Changes:wpaul2003-07-161-0/+26
| | | | | | | | | | | | | | | | | | | - 5705 doesn't support jumbo frames - Statistics must be read from registers - RX return ring must be capped at 512 entries - Omit initialization of certain device blocks - Acknowledge link change interrupts by setting the 'link changed' bit in the status register (used to have no effect) - Remember to toggle the MI completion bit too - Set the mbuf low watermark differently (on-chip memory buffers, not BSD mbufs) - Don't enable Ethernet@WireSpeed feature for certain 5705 chip revs - Add additional PCI IDs for 5705 and 5782 parts - Add a forgotten 5704 PCI ID Most changes ripped kicking and screaming from the Broadcom linux driver. Thanks to Paul Saab for sanity testing. (My lack of sanity has been confirmed.)
* Something I missed in my tree.ps2003-05-041-2/+18
| | | | | | If the media changes, poke the DSP on the 5401/5411 Broadcom PHY's. Obtained from: NetBSD
* - Move bge_phy_hack into the phy code and implement the various DSPps2003-05-031-20/+161
| | | | | | | | | | | | | | | | | | | | | | | | | patch workarounds for each phy revision. Obtained from: NetBSD & Broadcom Linux driver - Disable AUTOPOLL when accessing the PHY as it may cause PCI errors. Obtained from: NetBSD - Check the UPDATED bit in the status block so the driver knows that the status block as indeed changed since the last access. Broadcom documentation states drivers should unset the UPDATED/CHANGED bits after reading them. - When changing media types, first loop the phy then set the media. Broadcom documentation and Linux drivers do this and I observed much better handling of link after this change. - Broadcom documentation states that for 1000BaseT operation, autonegotiation must be enabled. Fix hard coding of media so that the driver only advertises 1000BaseT as the supported media type and enable autonegotition. - Only set Master/Slave on the 5701. Obtained from Broadcom Linux driver.
OpenPOWER on IntegriCloud