aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/stge
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-10-15 14:52:11 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-10-15 14:52:11 +0000
commit8e5d93dbb40452863b266a378868255bf986af67 (patch)
tree6dd0ca5b178547c1f20c8ce1f607ac42d4afe2ae /sys/dev/stge
parentd1457e3703928a249a45a6dd996918bc7eb6ba20 (diff)
Notes
Diffstat (limited to 'sys/dev/stge')
-rw-r--r--sys/dev/stge/if_stge.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/stge/if_stge.c b/sys/dev/stge/if_stge.c
index aa99dc920cbe7..9e85771940271 100644
--- a/sys/dev/stge/if_stge.c
+++ b/sys/dev/stge/if_stge.c
@@ -576,7 +576,7 @@ stge_attach(device_t dev)
struct stge_softc *sc;
struct ifnet *ifp;
uint8_t enaddr[ETHER_ADDR_LEN];
- int error, i;
+ int error, flags, i;
uint16_t cmd;
uint32_t val;
@@ -738,9 +738,14 @@ stge_attach(device_t dev)
(PC_PhyDuplexPolarity | PC_PhyLnkPolarity);
/* Set up MII bus. */
- if ((error = mii_phy_probe(sc->sc_dev, &sc->sc_miibus, stge_mediachange,
- stge_mediastatus)) != 0) {
- device_printf(sc->sc_dev, "no PHY found!\n");
+ flags = 0;
+ if (sc->sc_rev >= 0x40 && sc->sc_rev <= 0x4e)
+ flags |= MIIF_MACPRIV0;
+ error = mii_attach(sc->sc_dev, &sc->sc_miibus, ifp, stge_mediachange,
+ stge_mediastatus, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY,
+ flags);
+ if (error != 0) {
+ device_printf(sc->sc_dev, "attaching PHYs failed\n");
goto fail;
}