Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
SLI-4 base APIs

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...
 

Function Details

int32_t __sli_create_queue ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Issue command to create queue.

Parameters
sli4SLI context.
qPointer to queue object.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 3009 of file sli4.c.

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.

Description
This initializes the sli4_queue_t object members including the underlying DMA memory.
Parameters
sli4SLI context.
qPointer to queue object.
qtypeType of queue to create.
versionQueue version (e.g. V0, V1, ...).
sizeSize of each entry.
n_entriesNumber of entries to allocate.
alignStarting memory address alignment.
Note
Checks to see if using the existing DMA memory (if any) is possible. If not, frees existing memory an reallocates.
Returns
Returns 0 on success, non-zero otherwise

Definition at line 2953 of file sli4.c.

int32_t _sli_queue_write ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t *  entry 
)

Write an entry to the queue object.

Description
Note: Assumes the q->lock will be locked and released by the caller.
Parameters
sli4SLI context.
qPointer to queue object.
entryPointer to entry contents.
Returns
Returns queue index on success, or a negative error otherwise.

Definition at line 3397 of file sli4.c.

int32_t sli_bmbx_command ( sli4_t *  sli4)

Submit a command to the bootstrap mailbox and check the status.

Parameters
sli4SLI context pointer.
Returns
Returns 0 if command succeeded, or non-zero otherwise.

Definition at line 405 of file sli4.c.

int32_t sli_callback ( sli4_t *  sli4,
sli4_callback_e  which,
void *  func,
void *  arg 
)

Register a callback for the given event.

Parameters
sli4SLI context.
whichEvent of interest.
funcFunction to call when the event occurs.
argArgument passed to the callback function.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 2905 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
Returns
Returns the number of bytes written.

Definition at line 1603 of file sli4.c.

static int32_t sli_cmd_common_get_be_configuration_and_resources ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  tag 
)
static

Write a COMMON_COMMON_GET_BE_CONFIGURATION_AND_RESOURCES command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizebBuffer size in bytes.
tagCommand tag.
Returns
Returns the number of bytes written.

Definition at line 1322 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
Returns
Returns the number of bytes written.

Definition at line 1416 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
dmaDMA capable memory used to retrieve profile.
Returns
Returns the number of bytes written.

Definition at line 1454 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
start_profile_indexFirst profile index to return.
dmaBuffer into which the list will be written.
Returns
Returns the number of bytes written.

Definition at line 1555 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
dmaBuffer to store the link configuration mode from the physical device.
Returns
Returns the number of bytes written.

Definition at line 1683 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
contextNOP context value (passed to response, except on FC/FCoE).
Returns
Returns the number of bytes written.

Definition at line 1236 of file sli4.c.

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 
)
static

Write a COMMON_READ_TRANSCEIVER_DATA command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
page_numThe page of SFP data to retrieve (0xa0 or 0xa2).
portThe port from which to retrieve SFP data.
dmaDMA buffer for non-embedded commands.
Returns
Returns the number of bytes written.

Definition at line 1272 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
fdIf non-zero, set profile to factory default.
active_profile_idID of new active profile.
Returns
Returns the number of bytes written.

Definition at line 1642 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
mac_addrPointer to the 6 byte MAC address.
Returns
Returns the number of bytes written.

Definition at line 1362 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
featureThe feature to set.
param_lenThe length of the parameter (must be a multiple of 4 bytes).
parameterPointer to the parameter value.
Returns
Returns the number of bytes written.

Definition at line 1778 of file sli4.c.

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.

Parameters
sli4SLI context
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
dmaDMA capable memory containing profile.
profile_idProfile ID to configure.
descriptor_countNumber of descriptors in DMA buffer.
isapSet Active Profile value to use.
Returns
Returns the number of bytes written.

Definition at line 1504 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
dmaBuffer to assign the link configuration mode that is to become active from the physical device.
fdIf non-zero, set link config to factory default.
active_link_config_idID of new active profile.
Returns
Returns the number of bytes written.

Definition at line 1729 of file sli4.c.

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.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size in bytes.
tagCommand tag.
wq_idThe work queue id assigned to the connection.
gracefulIf true, a graceful upload is done, otherwise an abort without reset is sent.
Returns
Returns the number of bytes written.

Definition at line 1196 of file sli4.c.

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.

Parameters
sli4SLI context pointer.
bufVirtual pointer to destination buffer.
sizeBuffer size in bytes.
tagCommand tag.
lengthLength in bytes of attached command.
dmaDMA buffer for non-embedded commands.
Returns
Returns the number of bytes written.

Definition at line 508 of file sli4.c.

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.

Parameters
sli4SLI context.
cqCQ to process.
cqePointer to the CQ entry.
fieldsReturns the fields of the CQE to the caller.
Returns
Returns 0 on success, nor on-zero otherwise.

Definition at line 4009 of file sli4.c.

int32_t sli_cqe_async ( sli4_t *  sli4,
void *  buf 
)

Check asynchronous event completion entry.

Parameters
sli4SLI context.
bufPointer to ACQE.
Returns
Returns status field (0 success, non-zero otherwise).

Definition at line 1866 of file sli4.c.

int32_t sli_cqe_mq ( void *  buf)

Check mailbox/queue completion entry.

Parameters
bufPointer to MCQE.
Returns
Returns status field (0 success, non-zero otherwise).

Definition at line 1820 of file sli4.c.

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.

Parameters
sli4SLI context.
eqArray of EQs.
num_eqCount of EQs.
shiftPhase shift for staggering interrupts.
delay_multDelay multiplier for limiting interrupt frequency.
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 3098 of file sli4.c.

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.

Parameters
sli4SLI context.
bufPointer to EQ entry.
cq_idCQ_ID for this entry.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 3982 of file sli4.c.

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.

Parameters
sli4SLI context.
Returns
  • 0 if call completed correctly and no FW error occurred.
  • > 0 which indicates that a FW error has occurred.
  • -1 if call failed.

Definition at line 4070 of file sli4.c.

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.

Description
Allocates DMA memory and configures the requested queue type.
Parameters
sli4SLI context.
qtypeType of queue to create.
qPointer to queue object.
n_entriesNumber of entries to allocate.
assocAssociated queue (e.g. the EQ for a CQ, the CQ for a MQ, ...).
ulpULP to bind, which is only used for WQ and RQs.
Returns
Returns 0 on success, -1 otherwise

Definition at line 3135 of file sli4.c.

int32_t sli_queue_arm ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t  arm 
)

Arm or dis-arm a queue.

Parameters
sli4SLI context.
qPointer to queue object.
armIf TRUE, arm the queue.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 3356 of file sli4.c.

int32_t sli_queue_free ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Free a queue.

Frees DMA memory and de-registers the requested queue.
Parameters
sli4SLI context.
qPointer to queue object.
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 3218 of file sli4.c.

int32_t sli_queue_is_empty ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Check if the given queue is empty.

Description
If the valid bit of the current entry is unset, the queue is empty.
Parameters
sli4SLI context.
qPointer to queue object.
Returns
Returns TRUE if empty, or FALSE otherwise.

Definition at line 3327 of file sli4.c.

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.

Parameters
halPointer to the HAL context.
sli4SLI context.
qPointer to queue object.

Definition at line 3718 of file sli4.c.

uint32_t sli_queue_iscsi_free_cnt ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Return the number of free WRB entries.

Parameters
sli4SLI context.
qPointer to queue object.
Returns
Returns number of free WRBs.

Definition at line 3702 of file sli4.c.

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.

Parameters
sli4SLI context.
qPointer to queue object.
icd_indexThe icd index that completed.
wait_for_tcp_ackReturns 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_statusThe status to send for the IO once the TCP ACK is received.
Returns
Returns pointer to the IO or NULL if not found.

Definition at line 3651 of file sli4.c.

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.

Parameters
sli4SLI context.
qPointer to queue object.
icd_indexThe icd index that completed.
Returns
Returns pointer to the IO or NULL if not found.

Definition at line 3604 of file sli4.c.

int32_t sli_queue_iscsi_tcp_ack ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t  wqe_index 
)

Processes a TCP ACK completion.

Description
According to the manual, you may not receive a TCP acknowledgement for every message, we need to complete every request that was submitted prior to the indicated WQE index as well. So loop through the busy list and complete all the entries waiting for TCP ACKs up through the index we received.
Parameters
sli4SLI context.
qPointer to queue object.
wqe_indexThe wqe index that ACK'd.
Returns
Returns 0 on success, or non-zero value otherwise.

Definition at line 3532 of file sli4.c.

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.

Parameters
sli4SLI context.
qPointer to queue object.
wqe_indexThe wqe index that completed.
Returns
Returns pointer to the IO or NULL if not found.

Definition at line 3489 of file sli4.c.

int32_t sli_queue_read ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t *  entry 
)

Read an entry from the queue object.

Parameters
sli4SLI context.
qPointer to queue object.
entryDestination pointer for queue entry contents.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 3825 of file sli4.c.

int32_t sli_queue_reset ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Zero all queue entries and reset the indexes.

Parameters
sli4SLI context.
qPointer to queue object.
Returns
Returns 0 if successful.

Definition at line 3294 of file sli4.c.

int32_t sli_queue_write ( sli4_t *  sli4,
sli4_queue_t *  q,
uint8_t *  entry 
)

Write an entry to the queue object.

Parameters
sli4SLI context.
qPointer to queue object.
entryPointer to entry contents.
Returns
Returns queue index on success, or negative error otherwise.

Definition at line 3469 of file sli4.c.

uint32_t sli_reg_read ( sli4_t *  sli,
sli4_regname_e  reg 
)

Read the given SLI register.

Parameters
sliPointer to SLI context.
regRegister name enum.
Returns
Returns register value.

Definition at line 210 of file sli4.c.

void sli_reg_write ( sli4_t *  sli,
sli4_regname_e  reg,
uint32_t  val 
)

Write the value to the given SLI register.

Parameters
sliPointer to SLI context.
regRegister name enum.
valValue to write.
Returns
None.

Definition at line 234 of file sli4.c.

int32_t sli_setup ( sli4_t *  sli4,
ocs_os_handle_t  os,
sli4_port_type_e  port_type 
)

Setup the SLI context.

Parameters
sli4SLI context.
osDevice abstraction.
port_typeProtocol type of port (e.g. FC, NIC, ...).
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 2531 of file sli4.c.

int32_t sli_teardown ( sli4_t *  sli4)

Tear down a SLI context.

Parameters
sli4SLI context.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 2865 of file sli4.c.