Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/allwinner/if_emac.c
Show All 12 Lines | |||||
if (sc->emac_irq == NULL) { | if (sc->emac_irq == NULL) { | ||||
device_printf(dev, "cannot allocate IRQ resources.\n"); | device_printf(dev, "cannot allocate IRQ resources.\n"); | ||||
error = ENXIO; | error = ENXIO; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
/* Create device sysctl node. */ | /* Create device sysctl node. */ | ||||
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), | ||||
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), | ||||
OID_AUTO, "process_limit", CTLTYPE_INT | CTLFLAG_RW, | OID_AUTO, "process_limit", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
&sc->emac_rx_process_limit, 0, sysctl_hw_emac_proc_limit, "I", | &sc->emac_rx_process_limit, 0, sysctl_hw_emac_proc_limit, "I", | ||||
"max number of Rx events to process"); | "max number of Rx events to process"); | ||||
sc->emac_rx_process_limit = EMAC_PROC_DEFAULT; | sc->emac_rx_process_limit = EMAC_PROC_DEFAULT; | ||||
error = resource_int_value(device_get_name(dev), device_get_unit(dev), | error = resource_int_value(device_get_name(dev), device_get_unit(dev), | ||||
"process_limit", &sc->emac_rx_process_limit); | "process_limit", &sc->emac_rx_process_limit); | ||||
if (error == 0) { | if (error == 0) { | ||||
if (sc->emac_rx_process_limit < EMAC_PROC_MIN || | if (sc->emac_rx_process_limit < EMAC_PROC_MIN || | ||||
Show All 12 Lines |