Changeset View
Changeset View
Standalone View
Standalone View
sys/net/iflib.c
Show First 20 Lines • Show All 3,856 Lines • ▼ Show 20 Lines | _task_fn_admin(void *context) | ||||
int i; | int i; | ||||
bool oactive, running, do_reset, do_watchdog; | bool oactive, running, do_reset, do_watchdog; | ||||
uint32_t reset_on = hz / 2; | uint32_t reset_on = hz / 2; | ||||
STATE_LOCK(ctx); | STATE_LOCK(ctx); | ||||
running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING); | running = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_RUNNING); | ||||
oactive = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE); | oactive = (if_getdrvflags(ctx->ifc_ifp) & IFF_DRV_OACTIVE); | ||||
do_reset = (ctx->ifc_flags & IFC_DO_RESET); | do_reset = (ctx->ifc_flags & IFC_DO_RESET); | ||||
do_watchdog = (ctx->ifc_flags & IFC_DO_WATCHDOG); | do_watchdog = (ctx->ifc_flags & IFC_DO_WATCHDOG) && LINK_ACTIVE(ctx); | ||||
ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); | ctx->ifc_flags &= ~(IFC_DO_RESET|IFC_DO_WATCHDOG); | ||||
STATE_UNLOCK(ctx); | STATE_UNLOCK(ctx); | ||||
if ((!running & !oactive) && | if ((!running & !oactive) && | ||||
!(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) | !(ctx->ifc_sctx->isc_flags & IFLIB_ADMIN_ALWAYS_RUN)) | ||||
return; | return; | ||||
CTX_LOCK(ctx); | CTX_LOCK(ctx); | ||||
▲ Show 20 Lines • Show All 2,701 Lines • Show Last 20 Lines |