MCPcopy Create free account
hub / github.com/F-Stack/f-stack / emac_watchdog

Function emac_watchdog

freebsd/arm/allwinner/if_emac.c:452–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452static void
453emac_watchdog(struct emac_softc *sc)
454{
455 struct ifnet *ifp;
456
457 EMAC_ASSERT_LOCKED(sc);
458
459 if (sc->emac_watchdog_timer == 0 || --sc->emac_watchdog_timer)
460 return;
461
462 ifp = sc->emac_ifp;
463
464 if (sc->emac_link == 0) {
465 if (bootverbose)
466 if_printf(sc->emac_ifp, "watchdog timeout "
467 "(missed link)\n");
468 } else
469 if_printf(sc->emac_ifp, "watchdog timeout -- resetting\n");
470
471 if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
472 ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
473 emac_init_locked(sc);
474 if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
475 emac_start_locked(ifp);
476}
477
478static void
479emac_tick(void *arg)

Callers 1

emac_tickFunction · 0.85

Calls 4

if_printfFunction · 0.85
if_inc_counterFunction · 0.85
emac_init_lockedFunction · 0.85
emac_start_lockedFunction · 0.85

Tested by

no test coverage detected