Ejemplo n.º 1
0
Archivo: fc.c Proyecto: 3a9LL/panda
/**
 * 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 );
}
Ejemplo n.º 2
0
Archivo: fc.c Proyecto: 3a9LL/panda
/**
 * 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 );
}
Ejemplo n.º 3
0
/**
 * 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;
	}
}