]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r213893, r213908, r214566, r214605, r214846
authormarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 7 Nov 2010 11:12:29 +0000 (11:12 +0000)
committermarius <marius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 7 Nov 2010 11:12:29 +0000 (11:12 +0000)
commit1b25e984c6082bc61ee722baf78d09444c97d1bf
tree04556d2ac5cd72e1720ce6cc42639006bff64577
parent5937980819dd8c47d192e19baa3c157423cbe015
MFC: r213893, r213908, r214566, r214605, r214846

Convert the PHY drivers to honor the mii_flags passed down and convert
the NIC drivers as well as the PHY drivers to take advantage of the
mii_attach() introduced in r213878 (MFC'ed to stable/8 in r214684) to
get rid of certain hacks. For the most part these were:
- Artificially limiting miibus_{read,write}reg methods to certain PHY
  addresses; we now let mii_attach() only probe the PHY at the desired
  address(es) instead.
- PHY drivers setting MIIF_* flags based on the NIC driver they hang
  off from, partly even based on grabbing and using the softc of the
  parent; we now pass these flags down from the NIC to the PHY drivers
  via mii_attach(). This got us rid of all such hacks except those of
  brgphy() in combination with bce(4) and bge(4), which is way beyond
  what can be expressed with simple flags.

While at it, I took the opportunity to change the NIC drivers to pass
up the error returned by mii_attach() (previously by mii_phy_probe())
and unify the error message used in this case where and as appropriate
as mii_attach() actually can fail for a number of reasons, not just
because of no PHY(s) being present at the expected address(es).

Reviewed by: jhb, yongari

git-svn-id: svn://svn.freebsd.org/base/stable/8@214909 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
65 files changed:
sys/arm/xscale/ixp425/if_npe.c
sys/dev/ae/if_ae.c
sys/dev/ae/if_aevar.h
sys/dev/age/if_age.c
sys/dev/alc/if_alc.c
sys/dev/ale/if_ale.c
sys/dev/bfe/if_bfe.c
sys/dev/bge/if_bge.c
sys/dev/bge/if_bgereg.h
sys/dev/bm/if_bm.c
sys/dev/cas/if_cas.c
sys/dev/cas/if_casvar.h
sys/dev/dc/dcphy.c
sys/dev/dc/if_dc.c
sys/dev/dc/pnphy.c
sys/dev/fxp/if_fxp.c
sys/dev/gem/if_gem.c
sys/dev/gem/if_gemvar.h
sys/dev/hme/if_hme.c
sys/dev/jme/if_jme.c
sys/dev/mge/if_mge.c
sys/dev/mii/acphy.c
sys/dev/mii/amphy.c
sys/dev/mii/atphy.c
sys/dev/mii/axphy.c
sys/dev/mii/bmtphy.c
sys/dev/mii/brgphy.c
sys/dev/mii/ciphy.c
sys/dev/mii/e1000phy.c
sys/dev/mii/exphy.c
sys/dev/mii/gentbi.c
sys/dev/mii/icsphy.c
sys/dev/mii/inphy.c
sys/dev/mii/ip1000phy.c
sys/dev/mii/jmphy.c
sys/dev/mii/lxtphy.c
sys/dev/mii/miivar.h
sys/dev/mii/mlphy.c
sys/dev/mii/nsgphy.c
sys/dev/mii/nsphy.c
sys/dev/mii/nsphyter.c
sys/dev/mii/pnaphy.c
sys/dev/mii/qsphy.c
sys/dev/mii/rgephy.c
sys/dev/mii/rlphy.c
sys/dev/mii/rlswitch.c
sys/dev/mii/ruephy.c
sys/dev/mii/smcphy.c
sys/dev/mii/tdkphy.c
sys/dev/mii/tlphy.c
sys/dev/mii/truephy.c
sys/dev/mii/ukphy.c
sys/dev/mii/xmphy.c
sys/dev/msk/if_msk.c
sys/dev/pcn/if_pcn.c
sys/dev/re/if_re.c
sys/dev/sk/if_sk.c
sys/dev/ste/if_ste.c
sys/dev/stge/if_stge.c
sys/dev/tsec/if_tsec.c
sys/dev/vge/if_vge.c
sys/dev/vr/if_vr.c
sys/dev/vr/if_vrreg.h
sys/dev/xl/if_xl.c
sys/pci/if_rl.c