summaryrefslogtreecommitdiffstats
path: root/sys/dev/mii
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Add locking to the kqueue subsystem. This also makes the kqueue subsystemjmg2004-08-151-1/+1
| | | | | | | | | | | | | a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops. Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases). Reviewed by: green, rwatson (both earlier versions)
* Add some missing <sys/module.h> includes which are masked by thephk2004-05-3010-0/+10
| | | | one on death-row in <sys/kernel.h>
* DP83840A on hme(4) don't advertise their media capabilities themselvesmarius2004-05-291-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | properly. This causes the autonegotiation to e.g. never establish a 100baseTX full-duplex link. The solution to this problem is to manually write the capabilities from the BMSR to the ANAR every time a media change occurs, even when already in autonegotiation mode. The NetBSD way of doing this is to set their MIIF_FORCEANEG flag in the NIC driver. This causes mii_phy_setmedia() to call mii_phy_auto() (which will set the ANAR according to the BMSR) even when the PHY alread is in autonegotiation mode. However, while doing the same on FreeBSD (which involves porting the MIIF_FORCEANEG flag and converting nsphy.c to use mii_phy_setmedia()) fixes autonegotiation, using mii_phy_setmedia() causes this driver to no longer work properly in the other modes. Another drawback of that approach is that this will also force writing the ANAR on other PHYs whose drivers use mii_phy_setmedia() and which are used with a NIC whose driver sets MIIF_FORCEANEG (e.g. hme(4) is known to be used together with 3 different PHYs while only the DP83840A require this workaround). So instead of moving to MIIF_FORCEANEG, just call mii_phy_auto() in nsphy_service() unconditionally when hanging off of a hme(4) and serving a media change This is part 1/2 of fixing autonegotiation on hme(4) using DP83840A PHYs.
* Spelling fix in a comment.marius2004-05-291-1/+1
|
* Remove double __FBSDID and move the remaining one into a common place aftermarius2004-05-2921-84/+27
| | | | | the license(s) and before the driver comment (the latter only in drivers not having __FBSDID at that location).
* Move __FBSDID out from under a comment.marius2004-05-291-3/+3
|
* Spelling fix in a comment.marius2004-05-291-1/+1
|
* Link state change notification of ethernet media to the routing socket.andre2004-05-031-4/+18
| | | | | | | | | | | | | | | o Extend the if_data structure with an ifi_link_state field and provide the corresponding defines for the valid states. o The mii_linkchg() callback updates the ifi_link_state field and calls rt_ifmsg() to notify listeners on the routing socket in addition to the kqueue KNOTE. o If vlans are configured on a physical interface notify and update all vlan pseudo devices as well with the vlan_link_state() callback. No objections by: sam, wpaul, ru, bms Brucification by: bde
* Correct the phy_service() routine case MII_TICK to correctly trackandre2004-05-039-19/+21
| | | | | | | | | | 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
* Make sure set the media type in the phy, we cannot trust it to have chosenphk2004-01-171-0/+1
| | | | | | | the type we happen to want. Bug triggered by net-booting soekris hardware which comes up in 10/hdx mode by default.
* 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
* Add support for SK-9521 V2.0 and 3COM 3C940.wilko2003-09-203-50/+114
| | | | | | | | | | Tested at 100Mbit only, using Asus P4P800 onboard 3C940. The -stable version of this patch I have in use for ~2 weeks now, and works just fine for me. Based on: Nathan L. Binkert's patch for OpenBSD Patch submitted by and thanks to: Jung-uk Kim <jkim@niksun.com> MFC after: 2 weeks
OpenPOWER on IntegriCloud