Go to the source code of this file.
| #define OCS_FW_ERR_DETECTION_TIMEOUT (1000) |
| #define OCS_RECOVERY_MODE_AUTO 2 |
| #define OCS_RECOVERY_MODE_MANUAL 1 |
| #define OCS_RECOVERY_STATE_IDLE 0x0 |
| #define OCS_RECOVERY_STATE_IN_PROGRESS 0x1 |
| #define OCS_RECOVERY_STATUS_FAILED -1 |
| #define OCS_RECOVERY_STATUS_IN_PROGRESS 1 |
| #define OCS_RECOVERY_STATUS_SUCCESS 0 |
| #define OCS_RESET_MODE_PORT_MIGRATION 0 |
| 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
-
| 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 |
- 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 |
|
) |
| |
| 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
-
| 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 |
- 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.