svn commit: r203070 - head/sys/dev/nve
John Baldwin
jhb at FreeBSD.org
Wed Jan 27 14:43:28 UTC 2010
Author: jhb
Date: Wed Jan 27 14:43:28 2010
New Revision: 203070
URL: http://svn.freebsd.org/changeset/base/203070
Log:
Initialize the ifnet before calling mii_phy_probe() as some phy drivers
(e.g. e1000phy(4)) expect if_dname to be valid when they are probed.
MFC after: 3 days
Modified:
head/sys/dev/nve/if_nve.c
Modified: head/sys/dev/nve/if_nve.c
==============================================================================
--- head/sys/dev/nve/if_nve.c Wed Jan 27 14:17:33 2010 (r203069)
+++ head/sys/dev/nve/if_nve.c Wed Jan 27 14:43:28 2010 (r203070)
@@ -526,14 +526,6 @@ nve_attach(device_t dev)
goto fail;
}
- /* Probe device for MII interface to PHY */
- DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n");
- if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) {
- device_printf(dev, "MII without any phy!\n");
- error = ENXIO;
- goto fail;
- }
-
/* Setup interface parameters */
ifp->if_softc = sc;
if_initname(ifp, device_get_name(dev), device_get_unit(dev));
@@ -549,6 +541,14 @@ nve_attach(device_t dev)
ifp->if_capabilities |= IFCAP_VLAN_MTU;
ifp->if_capenable |= IFCAP_VLAN_MTU;
+ /* Probe device for MII interface to PHY */
+ DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n");
+ if (mii_phy_probe(dev, &sc->miibus, nve_ifmedia_upd, nve_ifmedia_sts)) {
+ device_printf(dev, "MII without any phy!\n");
+ error = ENXIO;
+ goto fail;
+ }
+
/* Attach to OS's managers. */
ether_ifattach(ifp, eaddr);
More information about the svn-src-head
mailing list