FreeBSD/sys/dev/mps/mps.c
/* Periodic watchdog.  Is called with the driver lock already held. */
Periodic watchdog.  Is called with the driver lock already held.
Periodic watchdog . Is called with the driver lock already held .
static void
mps_periodic(void *arg)
{
	struct mps_softc *sc;
	uint32_t db;
	sc = (struct mps_softc *)arg;
	if (sc->mps_flags & MPS_FLAGS_SHUTDOWN)
		return;
	db = mps_regread(sc, MPI2_DOORBELL_OFFSET);
	if ((db & MPI2_IOC_STATE_MASK) == MPI2_IOC_STATE_FAULT) {
		mps_dprint(sc, MPS_FAULT, "IOC Fault 0x%08x, Resetting\n", db);
		mps_reinit(sc);
	}
	callout_reset(&sc->periodic, MPS_PERIODIC_DELAY * hz, mps_periodic, sc);
}
static void mps_periodic ( void * arg ) { struct mps_softc * sc ; uint32_t db ; sc = ( struct mps_softc * ) arg ; if ( sc -> mps_flags & MPS_FLAGS_SHUTDOWN ) return ; db = mps_regread ( sc , MPI2_DOORBELL_OFFSET ) ; if ( ( db & MPI2_IOC_STATE_MASK ) == MPI2_IOC_STATE_FAULT ) { mps_dprint ( sc , MPS_FAULT , " \n " , db ) ; mps_reinit ( sc ) ; } callout_reset ( & sc -> periodic , MPS_PERIODIC_DELAY * hz , mps_periodic , sc ) ; }
Periodic watchdog.
Periodic watchdog .