Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_recovery.h File Reference

Go to the source code of this file.

Data Structures

struct  ocs_fw_error_recovery_t
 

Macros

#define OCS_FW_ERR_DETECTION_TIMEOUT   (1000)
 
#define OCS_RECOVERY_MODE_MANUAL   1
 
#define OCS_RECOVERY_MODE_AUTO   2
 
#define OCS_RESET_MODE_PORT_MIGRATION   0
 
#define OCS_RECOVERY_STATE_IDLE   0x0
 
#define OCS_RECOVERY_STATE_IN_PROGRESS   0x1
 
#define OCS_RECOVERY_STATUS_SUCCESS   0
 
#define OCS_RECOVERY_STATUS_IN_PROGRESS   1
 
#define OCS_RECOVERY_STATUS_FAILED   -1
 

Functions

int32_t ocs_fw_err_recovery_setup (void)
 Create a FW error recovery thread. More...
 
void ocs_fw_err_recovery_stop (void)
 Stop FW error recovery thread. More...
 
int32_t ocs_dump_to_host (ocs_t *ocs, void *buf, uint32_t buflen, uint8_t dump_level)
 Create a Lancer dump into a memory buffer. More...
 
int32_t ocs_gendump (ocs_t *ocs, uint8_t dump_level)
 
int32_t ocs_recovery_reset (ocs_t *ocs, uint32_t reset_mode, uint8_t dump_level, bool trigger_dump)
 Initiate FW dump and do reset. More...
 

Macro Details

#define OCS_FW_ERR_DETECTION_TIMEOUT   (1000)

Definition at line 36 of file ocs_recovery.h.

#define OCS_RECOVERY_MODE_AUTO   2

Definition at line 38 of file ocs_recovery.h.

#define OCS_RECOVERY_MODE_MANUAL   1

Definition at line 37 of file ocs_recovery.h.

#define OCS_RECOVERY_STATE_IDLE   0x0

Definition at line 42 of file ocs_recovery.h.

#define OCS_RECOVERY_STATE_IN_PROGRESS   0x1

Definition at line 43 of file ocs_recovery.h.

#define OCS_RECOVERY_STATUS_FAILED   -1

Definition at line 48 of file ocs_recovery.h.

#define OCS_RECOVERY_STATUS_IN_PROGRESS   1

Definition at line 47 of file ocs_recovery.h.

#define OCS_RECOVERY_STATUS_SUCCESS   0

Definition at line 46 of file ocs_recovery.h.

#define OCS_RESET_MODE_PORT_MIGRATION   0

Definition at line 39 of file ocs_recovery.h.

Function Details

int32_t ocs_dump_to_host ( ocs_t *  ocs,
void *  buf,
uint32_t  buflen,
uint8_t  dump_level 
)

Create a Lancer dump into a memory buffer.

Description
This function creates a DMA buffer to hold a Lancer dump, sets the dump location to point to that buffer, then calls ocs_gen_dump to cause a dump to be transfered to the buffer. After the dump is complete it copies the dump to the provided user space buffer.
Parameters
ocsPointer to ocs structure
bufUser space buffer in which to store the dump
buflenLength of the user buffer in bytes
dump_levelGendump request level can be either chip-level or fdb
Returns
Returns 0 on success, non-zero on error.

Definition at line 581 of file ocs_recovery.c.

int32_t ocs_fw_err_recovery_setup ( void  )

Create a FW error recovery thread.

Returns
returns 0 for success, a negative error code value for failure.

Definition at line 742 of file ocs_recovery.c.

void ocs_fw_err_recovery_stop ( void  )

Stop FW error recovery thread.

Returns
void

Definition at line 191 of file ocs_recovery.c.

int32_t ocs_gendump ( ocs_t *  ocs,
uint8_t  dump_level 
)

Definition at line 480 of file ocs_recovery.c.

int32_t ocs_recovery_reset ( ocs_t *  ocs,
uint32_t  reset_mode,
uint8_t  dump_level,
bool  trigger_dump 
)

Initiate FW dump and do reset.

Parameters
ocsPointer to ocs instance
reset_modeGendump request mode can be auto-recovery / manual / port-migration
dump_levelGendump request level can be either chip-level or fdb
trigger_dumpTrigger FW dump
Returns
OCS_RECOVERY_STATUS_SUCCESS on success, OCS_RECOVERY_STATUS_IN_PROGRESS if recovery is already in progress, or OCS_RECOVERY_STATUS_FAILED on failure.

Definition at line 361 of file ocs_recovery.c.