summaryrefslogtreecommitdiff
path: root/sys/dev/pcn
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2010-11-07 11:12:29 +0000
committerMarius Strobl <marius@FreeBSD.org>2010-11-07 11:12:29 +0000
commit605d4f8b84e727c542eec73fceec034384cb7d5e (patch)
tree04556d2ac5cd72e1720ce6cc42639006bff64577 /sys/dev/pcn
parent3d100f4fe9bc2a19da822d875963a43ba4c5af7c (diff)
Notes
Diffstat (limited to 'sys/dev/pcn')
-rw-r--r--sys/dev/pcn/if_pcn.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/pcn/if_pcn.c b/sys/dev/pcn/if_pcn.c
index c52c22be3944..9f92dc37a0f6 100644
--- a/sys/dev/pcn/if_pcn.c
+++ b/sys/dev/pcn/if_pcn.c
@@ -635,13 +635,16 @@ pcn_attach(dev)
ifp->if_snd.ifq_maxlen = PCN_TX_LIST_CNT - 1;
/*
- * Do MII setup.
+ * Do MII setup. Note that loopback support isn't implemented.
+ * See the comment in pcn_miibus_readreg() for why we can't
+ * universally pass MIIF_NOISOLATE here.
*/
sc->pcn_extphyaddr = -1;
- if (mii_phy_probe(dev, &sc->pcn_miibus,
- pcn_ifmedia_upd, pcn_ifmedia_sts)) {
- device_printf(dev, "MII without any PHY!\n");
- error = ENXIO;
+ error = mii_attach(dev, &sc->pcn_miibus, ifp, pcn_ifmedia_upd,
+ pcn_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY,
+ MIIF_NOLOOP);
+ if (error != 0) {
+ device_printf(dev, "attaching PHYs failed\n");
goto fail;
}
/*