/** * Mark Fibre Channel link as down * * @v link Fibre Channel link state monitor * @v rc Link state */ static void fc_link_err ( struct fc_link_state *link, int rc ) { /* Record link state */ if ( rc == 0 ) rc = -EUNKNOWN_LINK_STATUS; link->rc = rc; /* Schedule another link examination */ start_timer_fixed ( &link->timer, FC_LINK_RETRY_DELAY ); }
/** * Handle Fibre Channel link retry timer expiry */ static void fc_link_expired ( struct retry_timer *timer, int over __unused ) { struct fc_link_state *link = container_of ( timer, struct fc_link_state, timer ); /* Schedule another link examination */ start_timer_fixed ( &link->timer, FC_LINK_RETRY_DELAY ); /* Examine link */ fc_link_examine ( link ); }
/** * Hold off watchdog timer * * @v retry Retry timer * @v over Failure indicator */ static void efi_watchdog_expired ( struct retry_timer *timer, int over __unused ) { EFI_BOOT_SERVICES *bs = efi_systab->BootServices; static CHAR16 data[] = WATCHDOG_DATA; EFI_STATUS efirc; int rc; DBGC2 ( timer, "EFI holding off watchdog timer\n" ); /* Restart this holdoff timer */ start_timer_fixed ( timer, ( WATCHDOG_HOLDOFF_SECS * TICKS_PER_SEC ) ); /* Reset watchdog timer */ if ( ( efirc = bs->SetWatchdogTimer ( WATCHDOG_TIMEOUT_SECS, WATCHDOG_CODE, sizeof ( data ), data ) ) != 0 ) { rc = -EEFI ( efirc ); DBGC ( timer, "EFI could not set watchdog timer: %s\n", strerror ( rc ) ); return; } }