| 450 | } |
| 451 | |
| 452 | static void |
| 453 | emac_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 | |
| 478 | static void |
| 479 | emac_tick(void *arg) |
no test coverage detected