Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bfe/if_bfe.c
Show All 12 Lines | |||||
if (bfe_dma_alloc(sc) != 0) { | if (bfe_dma_alloc(sc) != 0) { | ||||
device_printf(dev, "failed to allocate DMA resources\n"); | device_printf(dev, "failed to allocate DMA resources\n"); | ||||
error = ENXIO; | error = ENXIO; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, | ||||
"stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0, sysctl_bfe_stats, | "stats", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
sysctl_bfe_stats, | |||||
"I", "Statistics"); | "I", "Statistics"); | ||||
/* Set up ifnet structure */ | /* Set up ifnet structure */ | ||||
ifp = sc->bfe_ifp = if_alloc(IFT_ETHER); | ifp = sc->bfe_ifp = if_alloc(IFT_ETHER); | ||||
if (ifp == NULL) { | if (ifp == NULL) { | ||||
device_printf(dev, "failed to if_alloc()\n"); | device_printf(dev, "failed to if_alloc()\n"); | ||||
error = ENOSPC; | error = ENOSPC; | ||||
goto fail; | goto fail; | ||||
Show All 12 Lines |