Commit Graph

27 Commits

Author SHA1 Message Date
pooka
db460c0fb8 Match only first instance of rlphy, following suite from Free/OpenBSD.
should fix PR kern/42950, variant of patch from "js" on irc
2011-01-20 14:26:11 +00:00
mlelstv
f9c11ac3ae rlphy fails to work without autonegotiation.
Reason is that ifm_data does not store BMCR data but a media index
that gets poked into the BMCR register.

Setting the BMCR and ANAR registers is correctly handled by the
generic function mii_phy_setmedia.
2010-11-14 13:40:36 +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
cegger
351ce8ab9a Use mii_anar(). No functional change. 2009-01-16 20:52:20 +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
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
uwe
2b2a00534e Add missing aprint_naive("\n"); in rlphyattach. 2007-11-06 00:58:32 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
isaki
e334010e29 Correct indent. 2007-10-13 13:05:19 +00:00
tsutsui
eab20f9c7f Fix wrong softc size (missed in the previous). 2007-05-09 23:16:37 +00:00
tsutsui
d60cbb92f9 Prepare sc_rtl8201l flag in softc and use it in rlphy_status() so that
we don't have to check device names of device_parent(). From FreeBSD.
2007-03-20 10:17:18 +00:00
tsutsui
af7a0c1731 Prepare rlphy_reset() and set BMCR_AUTOEN in it.
This makes autonegotiation on rlphy(4) at re(4)
on landisk (8139C+) select 100baseTX full-duplex
at boot time (before first ifconfig) properly,
and there is no bad side effect on rlphy(4) at nfe(4).

This may also fix PR kern/34109.
2007-03-19 12:23:30 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
tsutsui
ff1bacae2e Make rlphy also match if parent MII is re(4) for RTL8139C+ case.
Tested by Brian A. Seklecki.
2006-11-03 17:05:16 +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
6e53f1366a Use device_parent(). 2006-03-25 23:14:58 +00:00
chs
bf841929a2 add an rlphy clone from IC Plus. from openbsd. 2006-03-14 04:48:44 +00:00
chs
04a5c7d219 fix match for RealTek 8201L. 2006-03-12 22:30:24 +00:00
kleink
f518d0e3f3 Reduce previous (!is(...) != 0) to (!is(...)). 2006-02-28 22:52:34 +00:00
thorpej
cbb0407210 Use device_is_a() more. 2006-02-27 02:58:56 +00:00
thorpej
6a56683d19 Use device_is_a(). 2006-02-27 02:56:19 +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
xtraeme
d064eae373 Add rlphy(4) (Realtek 8139/8201L PHY) from OpenBSD. 2006-01-04 21:52:17 +00:00