Commit Graph

36 Commits

Author SHA1 Message Date
bouyer 6d07b400dc Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
2009-10-19 18:41:07 +00:00
cegger add29455bf fix media priorities:
IEEE 802.3 Annex 28B.3 specifies the following relative
priorities of the technologies supported by
802.3 Selector Field value:

1000BASE-T full duplex
1000BASE-T
100BASE-T2 full duplex
100BASE-TX full duplex
100BASE-T2
100BASE-T4
100BASE-TX
10BASE-T full duplex
10BAST-T

Our drivers give 100BASE-T4 a higher priority than
100BASE-TX full duplex.
Fix this. This patch is based on changes in FreeBSD and OpenBSD.

Patch presented on tech-kern and tech-net:
http://mail-index.netbsd.org/tech-kern/2009/02/15/msg004397.html
http://mail-index.netbsd.org/tech-net/2009/02/15/msg001064.html

got no comments, no objections.
2009-02-16 08:00:42 +00:00
dyoung ddbd8176f9 Reduce code duplication: most PHY drivers call mii_phy_add_media()
when they attach to the device tree, so call pmf_device_register(9)
once there instead of once in more than twenty drivers.
2008-11-17 03:04:27 +00:00
xtraeme 7db0e57765 device_t/softc split for all mii(4) devices, and other related
cosmetic changes.
2008-05-04 17:06:09 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger cf417aad7e use aprint_*_dev and device_xname 2008-04-08 20:08:49 +00:00
dyoung 401b2c3477 Remove the device_is_active() check from each individual PHY's
service routine.  Add a wrapper for PHY_SERVICE(), called phy_service(),
and check device_is_active() there.  Make the mii_*() routines call
the PHY service routines thorugh phy_service() instead of PHY_SERVICE().

In mii_phy_resume(), restore a PHY's state after resetting it by
sending a MII_MEDIACHG command.  This change makes bnx(4) resume
more reliably and more quickly; it should help other NICs to resume,
too, if they attach PHYs through MII.
2007-12-29 19:34:55 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
christos 5e16b7787c - don't hardcode 5, 10 define and use MII_ANEGTICKS{,_GIGE}
- instead of != limit, use <= limit (conservative)
2006-11-16 21:24:06 +00:00
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
thorpej 838ee1e0d9 Use device_private(). 2006-03-29 06:51:47 +00:00
thorpej 3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
thorpej 1efb3da0fb Make use of static. 2004-08-23 06:16:06 +00:00
thorpej c31f87a5cb Use aprint*(). 2003-04-29 01:49:33 +00:00
thorpej c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej 71adb76f75 Use CFATTACH_DECL(). 2002-09-30 21:57:46 +00:00
thorpej f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
simonb c19a094675 Don't include <malloc.h> - no memory management style functions are use
in any of the MII drivers.
2002-07-03 06:25:49 +00:00
thorpej b017898534 Get flags passed down to PHY drivers correctly. This was done on
an adhoc basis in a couple of PHY drivers, this fixes it more generally.

Per a discussion w/ Cliff Neighbors <cliff@allegronetworks.com>.
2002-03-25 20:51:24 +00:00
lukem 8b7bb91219 add RCSID 2001-11-13 07:38:28 +00:00
thorpej 89893e42b7 ANSI'ify. 2001-08-25 18:04:01 +00:00
thorpej 424f7a1e65 Make PHY matching all table-driven. 2001-06-02 21:39:38 +00:00
thorpej ea1aed7db2 Make the number of ticks between auto-negotiation tries PHY-specific,
and default every PHY to 5 seconds (what we used before).  If we find
Gig-E media on a PHY, bump it to 10 seconds, since it can take 5
seconds just to negotiate a Gig-E link.
2001-05-31 16:02:29 +00:00
drochner adf9edcd41 update for miidevs changes 2001-03-28 14:16:49 +00:00
thorpej 49014bf59f Restructure the PHY entry points to use a structure of entry points
instead of discrete function pointers, and extend this to include
a "reset" entry point.  Make sure any PHY-specific reset routine is
always used, and provide one for the LXT-970 which disables MII
interrupts (as is done for a few other PHYs we have drivers for).
2000-07-04 03:28:59 +00:00
thorpej ad61d101be Factor out the tick handling code into a common function, and send
rt_ifmsg's when the link speed or link status changes.
2000-03-06 20:56:56 +00:00
thorpej 22fe15d7b4 Let mii_phy_setmedia() handle the IFM_AUTO case, too. 2000-02-02 23:34:56 +00:00
thorpej 8923ca0b00 Make PHY drivers provide a pointer to their status routine, and add
a generic mii_phy_status() that calls back into the PHY.  It doesn't
do anything interesting yet, but it will soon.
2000-02-02 17:50:43 +00:00
thorpej eed75dbc26 Don't dry to diving MIIF_NOISOLATE in the PHY drivers. Instead, pass
flags down from the parent to child vi mii_attach().
2000-02-02 17:09:38 +00:00
thorpej 84dc99fdea Bring some order to the chaos which was the MII code function naming
"conventions".
2000-02-02 08:05:26 +00:00
thorpej c74e0a8db2 Add detachment support to the MII layer. 2000-01-27 16:44:30 +00:00
thorpej bca88a28c8 Add mii_down(), which is used by MAC drivers to inform PHYs that the
interface is now down.  PHYs use this to cancel pending asynchronous
operations.
1999-11-12 18:12:59 +00:00
thorpej 8fc600c3b1 Clean up the code that adds media a little, and make media selection
table-driven in preparation for some other changes to be made.
1999-11-03 22:30:32 +00:00
soren b8e941e9b0 Add PHY driver the the Intel 82553 found on some fxp's.
Some variants of this chip need a little extra MII fix before
being usable, so this is not yet put into GENERIC's.
1999-09-05 00:40:27 +00:00