Go to the source code of this file.
Functions | |
| static void | ocs_adapter_event_processing (ocs_t *ocs, bool port_reset, bool start) |
| Handle the EQ processing for all the ocs instances of the adapter. More... | |
| static void | ocs_adapter_hal_inactive (ocs_t *ocs, bool port_reset) |
| Set OCS HAL state to inactive for all the ocs instances of the adapter. More... | |
| static void | ocs_adapter_sport_shutdown (ocs_t *ocs, bool port_reset) |
| Shutdown sport(s) for all the ocs instances of the adapter. More... | |
| static void | ocs_adapter_xport_shutdown (ocs_t *ocs, bool port_reset) |
| Shutdown xport(s) for all the ocs instances of the adapter. More... | |
| static int32_t | ocs_adapter_xport_online (ocs_t *ocs, bool port_reset) |
| Bring the links online. More... | |
| void | ocs_fw_err_recovery_stop (void) |
| Stop FW error recovery thread. More... | |
| static void | ocs_recovery_state_set (uint32_t state) |
| Set recovery state. More... | |
| static int32_t | ocs_recovery_state_check (uint32_t state) |
| Check recovery state. More... | |
| void | ocs_fw_dump_state_set (ocs_t *ocs, uint32_t state) |
| Set fW dump state. More... | |
| static int32_t | ocs_fw_dump_save (ocs_t *ocs, uint8_t dump_level) |
| Save dump data to OCS buffer; saved_buff will be copied to the user space buffer when an application requests for it. More... | |
| static int32_t | ocs_fw_dump_req (ocs_t *ocs, uint8_t dump_level) |
| Request FW dump. More... | |
| 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... | |
| static int32_t | ocs_initiate_gendump (ocs_t *ocs, uint8_t dump_level) |
| int32_t | ocs_gendump (ocs_t *ocs, uint8_t dump_level) |
| static int32_t | ocs_fw_dump_ready_wait (ocs_t *ocs, uint8_t dump_state) |
| Waits for FW_DUMP_PRESENT flag to be set in fw_dump.flags context, and if recovery is started, waits for recovery completion. More... | |
| static int32_t | ocs_fw_dump_copy_to_user (ocs_t *ocs, uint8_t *user_buff, uint32_t user_buflen, uint8_t dump_state) |
| Copy dump buffers to user space buffer. 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... | |
| static int32_t | ocs_adapter_recover (ocs_t *ocs, uint32_t mode) |
| Recover adapter from chip error. More... | |
| static int32_t | ocs_recovery_thread (ocs_thread_t *th) |
| OCS FW error recovery thread. More... | |
| int32_t | ocs_fw_err_recovery_setup (void) |
| Create a FW error recovery thread. More... | |
| void | ocs_fw_dump_init (ocs_t *ocs, int32_t fw_dump_type) |
| Initialize fw dump context. More... | |
Variables | |
| ocs_fw_error_recovery_t | ocs_recovery |
|
static |
Handle the EQ processing for all the ocs instances of the adapter.
Definition at line 42 of file ocs_recovery.c.
|
static |
Set OCS HAL state to inactive for all the ocs instances of the adapter.
Definition at line 74 of file ocs_recovery.c.
|
static |
Recover adapter from chip error.
Definition at line 650 of file ocs_recovery.c.
|
static |
Shutdown sport(s) for all the ocs instances of the adapter.
Definition at line 99 of file ocs_recovery.c.
|
static |
Bring the links online.
Definition at line 159 of file ocs_recovery.c.
|
static |
Shutdown xport(s) for all the ocs instances of the adapter.
Definition at line 133 of file ocs_recovery.c.
| 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.
| ocs | Pointer to ocs structure |
| buf | User space buffer in which to store the dump |
| buflen | Length of the user buffer in bytes |
| dump_level | Gendump request level can be either chip-level or fdb |
Definition at line 581 of file ocs_recovery.c.
|
inlinestatic |
Copy dump buffers to user space buffer.
Definition at line 544 of file ocs_recovery.c.
| void ocs_fw_dump_init | ( | ocs_t * | ocs, |
| int32_t | fw_dump_type | ||
| ) |
Initialize fw dump context.
Definition at line 762 of file ocs_recovery.c.
|
static |
Waits for FW_DUMP_PRESENT flag to be set in fw_dump.flags context, and if recovery is started, waits for recovery completion.
Definition at line 503 of file ocs_recovery.c.
|
static |
Request FW dump.
| ocs | Pointer to ocs instance |
| dump_level | Gendump request level can be either chip-level or fdb |
Definition at line 324 of file ocs_recovery.c.
|
static |
Save dump data to OCS buffer; saved_buff will be copied to the user space buffer when an application requests for it.
Definition at line 263 of file ocs_recovery.c.
| void ocs_fw_dump_state_set | ( | ocs_t * | ocs, |
| uint32_t | state | ||
| ) |
| int32_t ocs_fw_err_recovery_setup | ( | void | ) |
Create a FW error recovery thread.
Definition at line 742 of file ocs_recovery.c.
| void ocs_fw_err_recovery_stop | ( | void | ) |
| int32_t ocs_gendump | ( | ocs_t * | ocs, |
| uint8_t | dump_level | ||
| ) |
Definition at line 480 of file ocs_recovery.c.
|
static |
If FW dump exists already due to recovery processs, return it. Else, do gendump and reset the adapter.
Definition at line 450 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.
| ocs | Pointer to ocs instance |
| reset_mode | Gendump request mode can be auto-recovery / manual / port-migration |
| dump_level | Gendump request level can be either chip-level or fdb |
| trigger_dump | Trigger FW dump |
Definition at line 361 of file ocs_recovery.c.
|
static |
Check recovery state.
Definition at line 213 of file ocs_recovery.c.
|
static |
Set recovery state.
Definition at line 201 of file ocs_recovery.c.
| ocs_fw_error_recovery_t ocs_recovery |
Definition at line 37 of file ocs_recovery.c.