diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 01:37:46 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2005-06-11 01:37:46 +0000 |
| commit | cd036ec1936a2f54579f0c92c7144867beebf615 (patch) | |
| tree | 8113efbab82d5bec5e92fdd42f08d37b6e0b221d /sys/dev/nve | |
| parent | 9aa0eba464bf36b61a8bdcbde8085794cf1c74b8 (diff) | |
Notes
Diffstat (limited to 'sys/dev/nve')
| -rw-r--r-- | sys/dev/nve/if_nve.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c index 131502d7949f..bf6d0345f36b 100644 --- a/sys/dev/nve/if_nve.c +++ b/sys/dev/nve/if_nve.c @@ -492,21 +492,23 @@ nve_attach(device_t dev) /* Display ethernet address ,... */ device_printf(dev, "Ethernet address %6D\n", eaddr, ":"); - DEBUGOUT(NVE_DEBUG_INIT, "nve: do mii_phy_probe\n"); + /* Allocate interface structures */ + ifp = sc->ifp = if_alloc(IFT_ETHER); + if (ifp == NULL) { + device_printf(dev, "can not if_alloc()\n"); + error = ENOSPC; + 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 = sc->ifp = if_alloc(IFT_ETHER); - if (ifp == NULL) { - device_printf(dev, "can not if_alloc()\n"); - error = ENOSPC; - goto fail; - } ifp->if_softc = sc; if_initname(ifp, "nve", unit); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; |
