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
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
thorpej
d3a64bd0d8
Add code to recognize and set media on GMII (Gigabit MII) PHYs.
...
802.3 doens't specify ANAR or ANLPAR bits for GMII. Need to
use PHY-specific registers for this, for now, which means we
need specific drivers for the Gigabit-capable PHYs (I think the
most common is the BCM5400).
2001-04-30 19:49:08 +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
sommerfeld
ea313649ff
defopt MIIVERBOSE
2000-06-11 02:13:34 +00:00
augustss
43c5780ae1
Allow a verbose description to be printed with the option MIIVERBOSE.
2000-05-08 13:25:34 +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
thorpej
83f9ab3c87
Implement asynchronous autonegotiation when driven by the MII tick
...
(one-second clock). Prevents .5s delays every 5 seconds when the interface
is up but there is no link. Fixes PR 7361.
1999-04-23 04:24:32 +00:00
thorpej
567710942c
Add a driver for "generic unknown PHYs", meant as a catch-all for
...
PHYs we don't have specific drivers for. While this will not give
optimum operation, it will allow network interface drivers to at least
function while drivers for their specific PHYs are written.
1998-11-05 00:36:48 +00:00