Functions | |
| uint32_t | sli_reg_read (sli4_t *sli, sli4_regname_e reg) |
| Read the given SLI register. More... | |
| void | sli_reg_write (sli4_t *sli, sli4_regname_e reg, uint32_t val) |
| Write the value to the given SLI register. More... | |
| int32_t | sli_bmbx_command (sli4_t *sli4) |
| Submit a command to the bootstrap mailbox and check the status. More... | |
| int32_t | sli_cmd_mailbox_queue_entry (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t length, ocs_dma_t *dma) |
| Write a MQE header in the provided buffer. More... | |
| int32_t | sli_cmd_common_tcp_upload (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint16_t wq_id, uint8_t graceful) |
| Write a COMMON_TCP_UPLOAD command. More... | |
| int32_t | sli_cmd_common_nop (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint64_t context) |
| Write a COMMON_NOP command. More... | |
| static int32_t | sli_cmd_common_read_transceiver_data (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t page_num, uint32_t port, ocs_dma_t *dma) |
| Write a COMMON_READ_TRANSCEIVER_DATA command. More... | |
| static int32_t | sli_cmd_common_get_be_configuration_and_resources (sli4_t *sli4, void *buf, size_t size, uint64_t tag) |
| Write a COMMON_COMMON_GET_BE_CONFIGURATION_AND_RESOURCES command. More... | |
| int32_t | sli_cmd_common_set_be_configuration_and_resources (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint8_t *mac_addr) |
| Write a COMMON_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES command. More... | |
| int32_t | sli_cmd_common_get_function_config (sli4_t *sli4, void *buf, size_t size, uint64_t tag) |
| Write a COMMON_COMMON_GET_FUNCTION_CONFIG command. More... | |
| int32_t | sli_cmd_common_get_profile_config (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma) |
| Write a COMMON_COMMON_GET_PROFILE_CONFIG command. More... | |
| int32_t | sli_cmd_common_set_profile_config (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma, uint8_t profile_id, uint32_t descriptor_count, uint8_t isap) |
| Write a COMMON_COMMON_SET_PROFILE_CONFIG command. More... | |
| int32_t | sli_cmd_common_get_profile_list (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t start_profile_index, ocs_dma_t *dma) |
| Write a COMMON_COMMON_GET_PROFILE_LIST command. More... | |
| int32_t | sli_cmd_common_get_active_profile (sli4_t *sli4, void *buf, size_t size, uint64_t tag) |
| Write a COMMON_COMMON_GET_ACTIVE_PROFILE command. More... | |
| int32_t | sli_cmd_common_set_active_profile (sli4_t *sli4, void *buf, size_t size, uint64_t tag, uint32_t fd, uint32_t active_profile_id) |
| Write a COMMON_COMMON_SET_ACTIVE_PROFILE command. More... | |
| int32_t | sli_cmd_common_get_reconfig_link_info (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma) |
| Write a COMMON_COMMON_GET_RECONFIG_LINK_INFO command. More... | |
| int32_t | sli_cmd_common_set_reconfig_link_id (sli4_t *sli4, void *buf, size_t size, uint64_t tag, ocs_dma_t *dma, uint32_t fd, uint32_t active_link_config_id) |
| Write a COMMON_COMMON_SET_RECONFIG_LINK_ID command. More... | |
| int32_t | sli_cmd_common_set_features (sli4_t *sli4, void *buf, size_t size, uint32_t feature, uint32_t param_len, void *parameter) |
| Write a COMMON_SET_FEATURES command. More... | |
| int32_t | sli_cqe_mq (void *buf) |
| Check mailbox/queue completion entry. More... | |
| int32_t | sli_cqe_async (sli4_t *sli4, void *buf) |
| Check asynchronous event completion entry. More... | |
| int32_t | sli_setup (sli4_t *sli4, ocs_os_handle_t os, sli4_port_type_e port_type) |
| Setup the SLI context. More... | |
| int32_t | sli_teardown (sli4_t *sli4) |
| Tear down a SLI context. More... | |
| int32_t | sli_callback (sli4_t *sli4, sli4_callback_e which, void *func, void *arg) |
| Register a callback for the given event. More... | |
| int32_t | __sli_queue_init (sli4_t *sli4, sli4_queue_t *q, uint32_t qtype, uint32_t version, size_t size, uint32_t n_entries, uint32_t align) |
| Initialize a queue object. More... | |
| int32_t | __sli_create_queue (sli4_t *sli4, sli4_queue_t *q) |
| Issue command to create queue. More... | |
| int32_t | sli_eq_modify_delay (sli4_t *sli4, sli4_queue_t *eq, uint32_t num_eq, uint32_t shift, uint32_t delay_mult) |
| Modify the delay timer for all the EQs. More... | |
| int32_t | sli_queue_alloc (sli4_t *sli4, uint32_t qtype, sli4_queue_t *q, uint32_t n_entries, sli4_queue_t *assoc, uint16_t ulp) |
| Allocate a queue. More... | |
| int32_t | sli_queue_free (sli4_t *sli4, sli4_queue_t *q) |
| Free a queue. More... | |
| int32_t | sli_queue_reset (sli4_t *sli4, sli4_queue_t *q) |
| Zero all queue entries and reset the indexes. More... | |
| int32_t | sli_queue_is_empty (sli4_t *sli4, sli4_queue_t *q) |
| Check if the given queue is empty. More... | |
| int32_t | sli_queue_arm (sli4_t *sli4, sli4_queue_t *q, uint8_t arm) |
| Arm or dis-arm a queue. More... | |
| int32_t | _sli_queue_write (sli4_t *sli4, sli4_queue_t *q, uint8_t *entry) |
| Write an entry to the queue object. More... | |
| int32_t | sli_queue_write (sli4_t *sli4, sli4_queue_t *q, uint8_t *entry) |
| Write an entry to the queue object. More... | |
| void * | sli_queue_iscsi_wqe_complete (sli4_t *sli4, sli4_queue_t *q, uint8_t wqe_index) |
| Processes a solicited IO completion. Moves the WRB to the free list. More... | |
| int32_t | sli_queue_iscsi_tcp_ack (sli4_t *sli4, sli4_queue_t *q, uint8_t wqe_index) |
| Processes a TCP ACK completion. More... | |
| void * | sli_queue_iscsi_icd_lookup (sli4_t *sli4, sli4_queue_t *q, uint16_t icd_index) |
| Returns the IO tied to a specific ICD index. More... | |
| void * | sli_queue_iscsi_icd_invalid (sli4_t *sli4, sli4_queue_t *q, uint16_t icd_index, uint8_t *wait_for_tcp_ack, uint8_t tcp_ack_status) |
| Processes a target command invalidation IO completion. Moves the WRB to the free list. More... | |
| uint32_t | sli_queue_iscsi_free_cnt (sli4_t *sli4, sli4_queue_t *q) |
| Return the number of free WRB entries. More... | |
| void | sli_queue_iscsi_cleanup (void *hal, sli4_t *sli4, sli4_queue_t *q) |
| Moves any WQE entries from the busy back to the free list when a connection is uploaded. More... | |
| int32_t | sli_queue_read (sli4_t *sli4, sli4_queue_t *q, uint8_t *entry) |
| Read an entry from the queue object. More... | |
| int32_t | sli_eq_parse (sli4_t *sli4, uint8_t *buf, uint16_t *cq_id) |
| Parse an EQ entry to retrieve the CQ_ID for this event. More... | |
| int32_t | sli_cq_parse (sli4_t *sli4, sli4_queue_t *cq, uint8_t *cqe, sli4_qentry_fields_t *fields) |
| Parse a CQ entry to retrieve event type and associated queue. More... | |
| int32_t | sli_fw_error_status (sli4_t *sli4) |
| Read the SLIPORT_SEMAPHORE and SLIPORT_STATUS registers to check if the port status indicates that a FW error has occurred. More... | |
| int32_t __sli_create_queue | ( | sli4_t * | sli4, |
| sli4_queue_t * | q | ||
| ) |
| int32_t __sli_queue_init | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint32_t | qtype, | ||
| uint32_t | version, | ||
| size_t | size, | ||
| uint32_t | n_entries, | ||
| uint32_t | align | ||
| ) |
Initialize a queue object.
| sli4 | SLI context. |
| q | Pointer to queue object. |
| qtype | Type of queue to create. |
| version | Queue version (e.g. V0, V1, ...). |
| size | Size of each entry. |
| n_entries | Number of entries to allocate. |
| align | Starting memory address alignment. |
| int32_t _sli_queue_write | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t * | entry | ||
| ) |
Write an entry to the queue object.
| sli4 | SLI context. |
| q | Pointer to queue object. |
| entry | Pointer to entry contents. |
| int32_t sli_bmbx_command | ( | sli4_t * | sli4 | ) |
| int32_t sli_callback | ( | sli4_t * | sli4, |
| sli4_callback_e | which, | ||
| void * | func, | ||
| void * | arg | ||
| ) |
| int32_t sli_cmd_common_get_active_profile | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag | ||
| ) |
|
static |
| int32_t sli_cmd_common_get_function_config | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag | ||
| ) |
| int32_t sli_cmd_common_get_profile_config | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| ocs_dma_t * | dma | ||
| ) |
| int32_t sli_cmd_common_get_profile_list | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint32_t | start_profile_index, | ||
| ocs_dma_t * | dma | ||
| ) |
Write a COMMON_COMMON_GET_PROFILE_LIST command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| start_profile_index | First profile index to return. |
| dma | Buffer into which the list will be written. |
| int32_t sli_cmd_common_get_reconfig_link_info | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| ocs_dma_t * | dma | ||
| ) |
Write a COMMON_COMMON_GET_RECONFIG_LINK_INFO command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| dma | Buffer to store the link configuration mode from the physical device. |
| int32_t sli_cmd_common_nop | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint64_t | context | ||
| ) |
|
static |
Write a COMMON_READ_TRANSCEIVER_DATA command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| page_num | The page of SFP data to retrieve (0xa0 or 0xa2). |
| port | The port from which to retrieve SFP data. |
| dma | DMA buffer for non-embedded commands. |
| int32_t sli_cmd_common_set_active_profile | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint32_t | fd, | ||
| uint32_t | active_profile_id | ||
| ) |
Write a COMMON_COMMON_SET_ACTIVE_PROFILE command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| fd | If non-zero, set profile to factory default. |
| active_profile_id | ID of new active profile. |
| int32_t sli_cmd_common_set_be_configuration_and_resources | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint8_t * | mac_addr | ||
| ) |
Write a COMMON_COMMON_SET_BE_CONFIGURATION_AND_RESOURCES command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| mac_addr | Pointer to the 6 byte MAC address. |
| int32_t sli_cmd_common_set_features | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint32_t | feature, | ||
| uint32_t | param_len, | ||
| void * | parameter | ||
| ) |
Write a COMMON_SET_FEATURES command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size, in bytes. |
| feature | The feature to set. |
| param_len | The length of the parameter (must be a multiple of 4 bytes). |
| parameter | Pointer to the parameter value. |
| int32_t sli_cmd_common_set_profile_config | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| ocs_dma_t * | dma, | ||
| uint8_t | profile_id, | ||
| uint32_t | descriptor_count, | ||
| uint8_t | isap | ||
| ) |
Write a COMMON_COMMON_SET_PROFILE_CONFIG command.
| sli4 | SLI context |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| dma | DMA capable memory containing profile. |
| profile_id | Profile ID to configure. |
| descriptor_count | Number of descriptors in DMA buffer. |
| isap | Set Active Profile value to use. |
| int32_t sli_cmd_common_set_reconfig_link_id | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| ocs_dma_t * | dma, | ||
| uint32_t | fd, | ||
| uint32_t | active_link_config_id | ||
| ) |
Write a COMMON_COMMON_SET_RECONFIG_LINK_ID command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| dma | Buffer to assign the link configuration mode that is to become active from the physical device. |
| fd | If non-zero, set link config to factory default. |
| active_link_config_id | ID of new active profile. |
| int32_t sli_cmd_common_tcp_upload | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint16_t | wq_id, | ||
| uint8_t | graceful | ||
| ) |
Write a COMMON_TCP_UPLOAD command.
| sli4 | SLI context. |
| buf | Destination buffer for the command. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| wq_id | The work queue id assigned to the connection. |
| graceful | If true, a graceful upload is done, otherwise an abort without reset is sent. |
| int32_t sli_cmd_mailbox_queue_entry | ( | sli4_t * | sli4, |
| void * | buf, | ||
| size_t | size, | ||
| uint64_t | tag, | ||
| uint32_t | length, | ||
| ocs_dma_t * | dma | ||
| ) |
Write a MQE header in the provided buffer.
| sli4 | SLI context pointer. |
| buf | Virtual pointer to destination buffer. |
| size | Buffer size in bytes. |
| tag | Command tag. |
| length | Length in bytes of attached command. |
| dma | DMA buffer for non-embedded commands. |
| int32_t sli_cq_parse | ( | sli4_t * | sli4, |
| sli4_queue_t * | cq, | ||
| uint8_t * | cqe, | ||
| sli4_qentry_fields_t * | fields | ||
| ) |
| int32_t sli_cqe_async | ( | sli4_t * | sli4, |
| void * | buf | ||
| ) |
| int32_t sli_cqe_mq | ( | void * | buf | ) |
| int32_t sli_eq_modify_delay | ( | sli4_t * | sli4, |
| sli4_queue_t * | eq, | ||
| uint32_t | num_eq, | ||
| uint32_t | shift, | ||
| uint32_t | delay_mult | ||
| ) |
| int32_t sli_eq_parse | ( | sli4_t * | sli4, |
| uint8_t * | buf, | ||
| uint16_t * | cq_id | ||
| ) |
| int32_t sli_fw_error_status | ( | sli4_t * | sli4 | ) |
Read the SLIPORT_SEMAPHORE and SLIPORT_STATUS registers to check if the port status indicates that a FW error has occurred.
| sli4 | SLI context. |
| int32_t sli_queue_alloc | ( | sli4_t * | sli4, |
| uint32_t | qtype, | ||
| sli4_queue_t * | q, | ||
| uint32_t | n_entries, | ||
| sli4_queue_t * | assoc, | ||
| uint16_t | ulp | ||
| ) |
Allocate a queue.
| sli4 | SLI context. |
| qtype | Type of queue to create. |
| q | Pointer to queue object. |
| n_entries | Number of entries to allocate. |
| assoc | Associated queue (e.g. the EQ for a CQ, the CQ for a MQ, ...). |
| ulp | ULP to bind, which is only used for WQ and RQs. |
| int32_t sli_queue_arm | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t | arm | ||
| ) |
| int32_t sli_queue_free | ( | sli4_t * | sli4, |
| sli4_queue_t * | q | ||
| ) |
| int32_t sli_queue_is_empty | ( | sli4_t * | sli4, |
| sli4_queue_t * | q | ||
| ) |
| void sli_queue_iscsi_cleanup | ( | void * | hal, |
| sli4_t * | sli4, | ||
| sli4_queue_t * | q | ||
| ) |
| uint32_t sli_queue_iscsi_free_cnt | ( | sli4_t * | sli4, |
| sli4_queue_t * | q | ||
| ) |
| void* sli_queue_iscsi_icd_invalid | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint16_t | icd_index, | ||
| uint8_t * | wait_for_tcp_ack, | ||
| uint8_t | tcp_ack_status | ||
| ) |
Processes a target command invalidation IO completion. Moves the WRB to the free list.
| sli4 | SLI context. |
| q | Pointer to queue object. |
| icd_index | The icd index that completed. |
| wait_for_tcp_ack | Returns a boolean whether we must wait for a TCP acknowledgement before completing the IO. (i.e. the HAL must not issue this completion to the caller because it may still be active in the FW). |
| tcp_ack_status | The status to send for the IO once the TCP ACK is received. |
| void* sli_queue_iscsi_icd_lookup | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint16_t | icd_index | ||
| ) |
| int32_t sli_queue_iscsi_tcp_ack | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t | wqe_index | ||
| ) |
Processes a TCP ACK completion.
| sli4 | SLI context. |
| q | Pointer to queue object. |
| wqe_index | The wqe index that ACK'd. |
| void* sli_queue_iscsi_wqe_complete | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t | wqe_index | ||
| ) |
| int32_t sli_queue_read | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t * | entry | ||
| ) |
| int32_t sli_queue_reset | ( | sli4_t * | sli4, |
| sli4_queue_t * | q | ||
| ) |
| int32_t sli_queue_write | ( | sli4_t * | sli4, |
| sli4_queue_t * | q, | ||
| uint8_t * | entry | ||
| ) |
| uint32_t sli_reg_read | ( | sli4_t * | sli, |
| sli4_regname_e | reg | ||
| ) |
| void sli_reg_write | ( | sli4_t * | sli, |
| sli4_regname_e | reg, | ||
| uint32_t | val | ||
| ) |
| int32_t sli_setup | ( | sli4_t * | sli4, |
| ocs_os_handle_t | os, | ||
| sli4_port_type_e | port_type | ||
| ) |