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

int32_t sli_bmbx_command (sli4_t *sli4)
 Submit a command to the bootstrap mailbox and check the status. More...
 
int32_t sli_cmd_config_link (sli4_t *sli4, void *buf, size_t size)
 Write a CONFIG_LINK command to the provided buffer. More...
 
int32_t sli_cmd_down_link (sli4_t *sli4, void *buf, size_t size)
 Write a DOWN_LINK command to the provided buffer. More...
 
int32_t sli_cmd_dump_type4 (sli4_t *sli4, void *buf, size_t size, uint16_t wki)
 Write a DUMP Type 4 command to the provided buffer. More...
 
int32_t sli_cmd_common_read_transceiver_data (sli4_t *sli4, void *buf, size_t size, uint32_t page_num, ocs_dma_t *dma)
 Write a COMMON_READ_TRANSCEIVER_DATA command. More...
 
int32_t sli_cmd_read_link_stats (sli4_t *sli4, void *buf, size_t size, uint8_t req_ext_counters, uint8_t clear_overflow_flags, uint8_t clear_all_counters)
 Write a READ_LINK_STAT command to the provided buffer. More...
 
int32_t sli_cmd_read_status (sli4_t *sli4, void *buf, size_t size, uint8_t clear_counters)
 Write a READ_STATUS command to the provided buffer. More...
 
int32_t sli_cmd_init_link (sli4_t *sli4, void *buf, size_t size, uint32_t speed, uint8_t reset_alpa)
 Write an INIT_LINK command to the provided buffer. More...
 
int32_t sli_cmd_init_vfi (sli4_t *sli4, void *buf, size_t size, uint16_t vfi, uint16_t fcfi, uint16_t vpi)
 Write an INIT_VFI command to the provided buffer. More...
 
int32_t sli_cmd_init_vpi (sli4_t *sli4, void *buf, size_t size, uint16_t vpi, uint16_t vfi)
 Write an INIT_VPI command to the provided buffer. More...
 
int32_t sli_cmd_post_xri (sli4_t *sli4, void *buf, size_t size, uint16_t xri_base, uint16_t xri_count)
 Write a POST_XRI command to the provided buffer. More...
 
int32_t sli_cmd_release_xri (sli4_t *sli4, void *buf, size_t size, uint8_t num_xri)
 Write a RELEASE_XRI command to the provided buffer. More...
 
int32_t sli_cmd_read_sparm64 (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint16_t vpi)
 Write a READ_SPARM64 command to the provided buffer. More...
 
int32_t sli_cmd_read_topology (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma)
 Write a READ_TOPOLOGY command to the provided buffer. More...
 
int32_t sli_cmd_reg_fcfi (sli4_t *sli4, void *buf, size_t size, uint16_t index, sli4_cmd_rq_cfg_t rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG], uint16_t vlan_id)
 Write a REG_FCFI command to the provided buffer. More...
 
int32_t sli_cmd_reg_rpi (sli4_t *sli4, void *buf, size_t size, uint32_t nport_id, uint16_t rpi, uint16_t vpi, ocs_dma_t *dma, uint8_t update, uint8_t enable_t10_pi, uint8_t hlm)
 Write a REG_RPI command to the provided buffer. More...
 
int32_t sli_cmd_reg_vfi (sli4_t *sli4, void *buf, size_t size, ocs_domain_t *domain)
 Write a REG_VFI command to the provided buffer. More...
 
int32_t sli_cmd_reg_vpi (sli4_t *sli4, void *buf, size_t size, ocs_sli_port_t *sport, uint8_t update)
 Write a REG_VPI command to the provided buffer. More...
 
int32_t sli_cmd_sli_config (sli4_t *sli4, void *buf, size_t size, uint32_t length, ocs_dma_t *dma)
 Write a SLI_CONFIG command to the provided buffer. More...
 
int32_t sli_cmd_unreg_fcfi (sli4_t *sli4, void *buf, size_t size, uint16_t indicator)
 Write a UNREG_FCFI command to the provided buffer. More...
 
int32_t sli_cmd_unreg_rpi (sli4_t *sli4, void *buf, size_t size, uint16_t indicator, sli4_resource_e which, uint32_t fc_id)
 Write an UNREG_RPI command to the provided buffer. More...
 
int32_t sli_cmd_unreg_vfi (sli4_t *sli4, void *buf, size_t size, ocs_domain_t *domain, uint32_t which)
 Write an UNREG_VFI command to the provided buffer. More...
 
int32_t sli_cmd_unreg_vpi (sli4_t *sli4, void *buf, size_t size, uint16_t indicator, uint32_t which)
 Write an UNREG_VPI command to the provided buffer. More...
 
int32_t sli_cmd_config_auto_xfer_rdy (sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len)
 Write an CONFIG_AUTO_XFER_RDY command to the provided buffer. Command to enable AXR in G5. More...
 
int32_t sli_cmd_config_auto_xfer_rdy_hp (sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t block_size)
 Write an CONFIG_AUTO_XFER_RDY_HP command to the provided buffer. More...
 
int32_t sli_cmd_config_optimized_write (sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t xri_cnt, uint32_t tow_feature)
 Write an CONFIG_OPTIMIZED_WRITE command to the provided buffer. More...
 
int32_t sli_cmd_config_optimized_write_hp (sli4_t *sli4, void *buf, size_t size, uint32_t max_burst_len, uint32_t xri_cnt, uint32_t block_size, uint32_t tow_feature)
 Write an CONFIG_OPTIMIZED_WRITE_HP command to the provided buffer. More...
 
int32_t sli_cmd_common_nop (sli4_t *sli4, void *buf, size_t size, uint64_t context)
 Write a COMMON_NOP command. More...
 
int32_t sli_cmd_common_get_resource_extent_info (sli4_t *sli4, void *buf, size_t size, uint16_t rtype)
 Write a COMMON_GET_RESOURCE_EXTENT_INFO command. More...
 
int32_t sli_cmd_common_get_sli4_parameters (sli4_t *sli4, void *buf, size_t size)
 Write a COMMON_GET_SLI4_PARAMETERS command. More...
 
int32_t sli_cmd_common_write_object (sli4_t *sli4, void *buf, size_t size, uint16_t noc, uint16_t eof, uint32_t desired_write_length, uint32_t offset, char *object_name, ocs_dma_t *dma)
 Write a COMMON_WRITE_OBJECT command. More...
 
int32_t sli_cmd_common_delete_object (sli4_t *sli4, void *buf, size_t size, char *object_name)
 Write a COMMON_DELETE_OBJECT command. More...
 
int32_t sli_cmd_common_read_object (sli4_t *sli4, void *buf, size_t size, uint32_t desired_read_length, uint32_t offset, char *object_name, ocs_dma_t *dma)
 Write a COMMON_READ_OBJECT command. More...
 
int32_t sli_cmd_dmtf_exec_clp_cmd (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *cmd, ocs_dma_t *resp)
 Write a DMTF_EXEC_CLP_CMD command. More...
 
int32_t sli_cmd_common_set_dump_location (sli4_t *sli4, void *buf, size_t size, uint8_t query, uint8_t is_buffer_list, ocs_dma_t *buffer, uint8_t fdb)
 Write a COMMON_SET_DUMP_LOCATION command. More...
 
int32_t sli_cmd_config_run_biu_diag (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *tx_buffer, size_t tx_buf_len, ocs_dma_t *rx_buffer, size_t rx_buf_len)
 Write a RUN_BIU_DIAG command. More...
 
int32_t sli_cmd_fcoe_set_loopback_mode (sli4_t *sli4, void *buf, size_t size, int type)
 Write a SLI4_OPC_FCOE_SET_LINK_DIAG_LOOPBACK command. More...
 
int32_t sli_cmd_fc_set_trunk_mode (sli4_t *sli4, void *buf, size_t size, uint32_t trunk_mode)
 Write a SLI4_OPC_FC_SET_TRUNK_MODE 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_cmd_common_get_profile_config (sli4_t *sli4, void *buf, size_t size, 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, 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, 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)
 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, 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, ocs_dma_t *dma)
 Write a COMMON_GET_RECONFIG_LINK_INFO command. More...
 
int32_t sli_cmd_common_set_reconfig_link_id (sli4_t *sli4, void *buf, size_t size, ocs_dma_t *dma, uint32_t fd, uint32_t active_link_config_id)
 Write a COMMON_SET_RECONFIG_LINK_ID command. More...
 
int32_t sli_cqe_mq (void *buf)
 Check the mailbox/queue completion entry. More...
 
int32_t sli_cqe_async (sli4_t *sli4, void *buf)
 Check the asynchronous event completion entry. More...
 
int32_t sli_setup (sli4_t *sli4, ocs_os_handle_t os, sli4_port_type_e port_type)
 Set up the SLI context. More...
 
int32_t sli_fw_reset (sli4_t *sli4)
 Issue a Firmware Reset. 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, 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 the command to create a queue. More...
 
int32_t sli_get_queue_entry_size (sli4_t *sli4, uint32_t qtype)
 Get queue entry size. 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_cq_alloc_set (sli4_t *sli4, sli4_queue_t *qs[], uint32_t num_cqs, uint32_t n_entries, sli4_queue_t *eqs[])
 Allocate a c queue set. More...
 
int32_t sli_queue_free (sli4_t *sli4, sli4_queue_t *q, uint32_t destroy_queues, uint32_t free_memory)
 Free a queue. 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_eq_arm (sli4_t *sli4, sli4_queue_t *q, uint8_t arm)
 Arm an EQ. More...
 
int32_t sli_queue_arm (sli4_t *sli4, sli4_queue_t *q, uint8_t arm)
 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...
 
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_resource_alloc (sli4_t *sli4, sli4_resource_e rtype, uint32_t *rid, uint32_t *index)
 Allocate SLI Port resources. More...
 
int32_t sli_resource_free (sli4_t *sli4, sli4_resource_e rtype, uint32_t rid)
 Free the SLI Port resources. 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_e *etype, uint16_t *q_id)
 Parse a CQ entry to retrieve the event type and the associated queue. More...
 
int32_t sli_raise_ue (sli4_t *sli4, uint8_t dump)
 Cause chip to enter an unrecoverable error state. More...
 
int32_t sli_dump_is_ready (sli4_t *sli4)
 Read the SLIPORT_STATUS register to to check if a dump is present. More...
 
int32_t sli_dump_is_present (sli4_t *sli4)
 Read the SLIPORT_STATUS register to check if a dump is present. More...
 
int32_t sli_reset_required (sli4_t *sli4)
 Read the SLIPORT_STATUS register to check if the reset required is set. 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_fw_ready (sli4_t *sli4)
 Determine if the chip FW is in a ready state. More...
 
int32_t sli_link_is_configurable (sli4_t *sli)
 Determine if the link can be configured. More...
 

Function Details

int32_t __sli_create_queue ( sli4_t *  sli4,
sli4_queue_t *  q 
)

Issue the command to create a queue.

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

Definition at line 4893 of file sli4.c.

int32_t __sli_queue_init ( sli4_t *  sli4,
sli4_queue_t *  q,
uint32_t  qtype,
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.
sizeSize of each entry.
n_entriesNumber of entries to allocate.
alignStarting memory address alignment.
Note
Checks if using the existing DMA memory (if any) is possible. If not, it frees the existing memory and re-allocates.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 4833 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.

Note: Assumes the q->lock will be locked and released by the caller.

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

Definition at line 5565 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 on success, or a non-zero value on failure.

Definition at line 493 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 4786 of file sli4.c.

int32_t sli_cmd_common_delete_object ( sli4_t *  sli4,
void *  buf,
size_t  size,
char *  object_name 
)

Write a COMMON_DELETE_OBJECT command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
object_nameName of the object to write.
Returns
Returns the number of bytes written.

Definition at line 2887 of file sli4.c.

int32_t sli_cmd_common_get_active_profile ( sli4_t *  sli4,
void *  buf,
size_t  size 
)

Write a COMMON_COMMON_GET_ACTIVE_PROFILE command.

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

Definition at line 3376 of file sli4.c.

int32_t sli_cmd_common_get_profile_config ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma 
)

Write a COMMON_COMMON_GET_PROFILE_CONFIG command.

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

Definition at line 3243 of file sli4.c.

int32_t sli_cmd_common_get_profile_list ( sli4_t *  sli4,
void *  buf,
size_t  size,
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.
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 3333 of file sli4.c.

int32_t sli_cmd_common_get_reconfig_link_info ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma 
)

Write a COMMON_GET_RECONFIG_LINK_INFO command.

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

Definition at line 3458 of file sli4.c.

int32_t sli_cmd_common_get_resource_extent_info ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  rtype 
)

Write a COMMON_GET_RESOURCE_EXTENT_INFO command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
rtypeResource type (for example, XRI, VFI, VPI, and RPI).
Returns
Returns the number of bytes written.

Definition at line 2663 of file sli4.c.

int32_t sli_cmd_common_get_sli4_parameters ( sli4_t *  sli4,
void *  buf,
size_t  size 
)

Write a COMMON_GET_SLI4_PARAMETERS command.

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

Definition at line 2696 of file sli4.c.

int32_t sli_cmd_common_nop ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint64_t  context 
)

Write a COMMON_NOP command.

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

Definition at line 2628 of file sli4.c.

int32_t sli_cmd_common_read_object ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  desired_read_length,
uint32_t  offset,
char *  object_name,
ocs_dma_t *  dma 
)

Write a COMMON_READ_OBJECT command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
desired_read_lengthNumber of bytes of data to read from the object.
offsetOffset, in bytes, from the start of the object.
object_nameName of the object to read.
dmaDMA structure from which the data will be copied.
Returns
Returns the number of bytes written.

Definition at line 2926 of file sli4.c.

int32_t sli_cmd_common_read_transceiver_data ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  page_num,
ocs_dma_t *  dma 
)

Write a COMMON_READ_TRANSCEIVER_DATA command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
page_numThe page of SFP data to retrieve (0xa0 or 0xa2).
dmaDMA structure from which the data will be copied.
Note
This creates a Version 0 message.
Returns
Returns the number of bytes written.

Definition at line 629 of file sli4.c.

int32_t sli_cmd_common_set_active_profile ( sli4_t *  sli4,
void *  buf,
size_t  size,
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.
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 3416 of file sli4.c.

int32_t sli_cmd_common_set_dump_location ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  query,
uint8_t  is_buffer_list,
ocs_dma_t *  buffer,
uint8_t  fdb 
)

Write a COMMON_SET_DUMP_LOCATION command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
queryZero to set dump location, non-zero to query dump size
is_buffer_listSet to one if the buffer is a set of buffer descriptors or set to 0 if the buffer is a contiguous dump area.
bufferDMA structure to which the dump will be copied.
Returns
Returns the number of bytes written.

Definition at line 3031 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.
featureFeature to set.
param_lenLength 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 3202 of file sli4.c.

int32_t sli_cmd_common_set_profile_config ( sli4_t *  sli4,
void *  buf,
size_t  size,
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.
dmaDMA capable memory containing profile.
profile_idProfile ID to configure.
descriptor_countNumber of descriptors in DMA buffer.
isapImplicit Set Active Profile value to use.
Returns
Returns the number of bytes written.

Definition at line 3287 of file sli4.c.

int32_t sli_cmd_common_set_reconfig_link_id ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma,
uint32_t  fd,
uint32_t  active_link_config_id 
)

Write a COMMON_SET_RECONFIG_LINK_ID command.

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

Definition at line 3505 of file sli4.c.

int32_t sli_cmd_common_write_object ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  noc,
uint16_t  eof,
uint32_t  desired_write_length,
uint32_t  offset,
char *  object_name,
ocs_dma_t *  dma 
)

Write a COMMON_WRITE_OBJECT command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
nocTrue if the object should be written but not committed to flash.
eofTrue if this is the last write for this object.
desired_write_lengthNumber of bytes of data to write to the object.
offsetOffset, in bytes, from the start of the object.
object_nameName of the object to write.
dmaDMA structure from which the data will be copied.
Returns
Returns the number of bytes written.

Definition at line 2831 of file sli4.c.

int32_t sli_cmd_config_auto_xfer_rdy ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  max_burst_len 
)

Write an CONFIG_AUTO_XFER_RDY command to the provided buffer. Command to enable AXR in G5.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
max_burst_lenif the write FCP_DL is less than this size, then the SLI port will generate the auto XFER_RDY.
Returns
Returns the number of bytes written.

Definition at line 1748 of file sli4.c.

int32_t sli_cmd_config_auto_xfer_rdy_hp ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  max_burst_len,
uint32_t  block_size 
)

Write an CONFIG_AUTO_XFER_RDY_HP command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
max_burst_lenif the write FCP_DL is less than this size,
esocenable start offset computation,
block_sizeblock size, then the SLI port will generate the auto XFER_RDY.
Returns
Returns the number of bytes written.

Definition at line 1778 of file sli4.c.

int32_t sli_cmd_config_link ( sli4_t *  sli4,
void *  buf,
size_t  size 
)

Write a CONFIG_LINK command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
Returns
Returns the number of bytes written.

Definition at line 546 of file sli4.c.

int32_t sli_cmd_config_optimized_write ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  max_burst_len,
uint32_t  xri_cnt,
uint32_t  tow_feature 
)

Write an CONFIG_OPTIMIZED_WRITE command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
max_burst_lenif the write FCP_DL is less than this size,
xri_cntTotal XRIs that will be posted, then the SLI port will generate the auto XFER_RDY.
Returns
Returns the number of bytes written.

Definition at line 1810 of file sli4.c.

int32_t sli_cmd_config_optimized_write_hp ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  max_burst_len,
uint32_t  xri_cnt,
uint32_t  block_size,
uint32_t  tow_feature 
)

Write an CONFIG_OPTIMIZED_WRITE_HP command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
max_burst_lenif the write FCP_DL is less than this size,
xri_cntTotal XRIs that will be posted,
block_sizeblock size, then the SLI port will generate the auto XFER_RDY.
Returns
Returns the number of bytes written.

Definition at line 1849 of file sli4.c.

int32_t sli_cmd_config_run_biu_diag ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  tx_buffer,
size_t  tx_buf_len,
ocs_dma_t *  rx_buffer,
size_t  rx_buf_len 
)

Write a RUN_BIU_DIAG command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
TXDMA buffer structure
TXDMA buffer size
RXDMA buffer structure
RXDMA buffer size
Returns
Returns the number of bytes written.

Definition at line 3084 of file sli4.c.

int32_t sli_cmd_dmtf_exec_clp_cmd ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  cmd,
ocs_dma_t *  resp 
)

Write a DMTF_EXEC_CLP_CMD command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
cmdDMA structure that describes the buffer for the command.
respDMA structure that describes the buffer for the response.
Returns
Returns the number of bytes written.

Definition at line 2985 of file sli4.c.

int32_t sli_cmd_down_link ( sli4_t *  sli4,
void *  buf,
size_t  size 
)

Write a DOWN_LINK command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
Returns
Returns the number of bytes written.

Definition at line 577 of file sli4.c.

int32_t sli_cmd_dump_type4 ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  wki 
)

Write a DUMP Type 4 command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
wkiThe well known item ID.
Returns
Returns the number of bytes written.

Definition at line 602 of file sli4.c.

int32_t sli_cmd_fc_set_trunk_mode ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  trunk_mode 
)

Write a SLI4_OPC_FC_SET_TRUNK_MODE command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
trunk_modeTrunk mode.
Returns
Returns the number of bytes written or '-1' if an invalid trunk mode is requested.

Definition at line 3165 of file sli4.c.

int32_t sli_cmd_fcoe_set_loopback_mode ( sli4_t *  sli4,
void *  buf,
size_t  size,
int  type 
)

Write a SLI4_OPC_FCOE_SET_LINK_DIAG_LOOPBACK command.

Parameters
sli4SLI context.
bufDestination buffer for the command.
sizeBuffer size, in bytes.
typeLoopback type.
Returns
Returns the number of bytes written.

Definition at line 3126 of file sli4.c.

int32_t sli_cmd_init_link ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  speed,
uint8_t  reset_alpa 
)

Write an INIT_LINK command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
speedLink speed.
reset_alpaFor native FC, this is the selective reset AL_PA
Returns
Returns the number of bytes written.

Definition at line 772 of file sli4.c.

int32_t sli_cmd_init_vfi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  vfi,
uint16_t  fcfi,
uint16_t  vpi 
)

Write an INIT_VFI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
vfiVFI
fcfiFCFI
vpiVPI (Set to -1 if unused.)
Returns
Returns the number of bytes written.

Definition at line 846 of file sli4.c.

int32_t sli_cmd_init_vpi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  vpi,
uint16_t  vfi 
)

Write an INIT_VPI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
vpiVPI allocated.
vfiVFI associated with this VPI.
Returns
Returns the number of bytes written.

Definition at line 883 of file sli4.c.

int32_t sli_cmd_post_xri ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  xri_base,
uint16_t  xri_count 
)

Write a POST_XRI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
xri_baseStarting XRI value for range of XRI given to SLI Port.
xri_countNumber of XRIs provided to the SLI Port.
Returns
Returns the number of bytes written.

Definition at line 909 of file sli4.c.

int32_t sli_cmd_read_link_stats ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  req_ext_counters,
uint8_t  clear_overflow_flags,
uint8_t  clear_all_counters 
)

Write a READ_LINK_STAT command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
req_ext_countersIf TRUE, then the extended counters will be requested.
clear_overflow_flagsIf TRUE, then overflow flags will be cleared.
clear_all_countersIf TRUE, the counters will be cleared.
Returns
Returns the number of bytes written.

Definition at line 679 of file sli4.c.

int32_t sli_cmd_read_sparm64 ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma,
uint16_t  vpi 
)

Write a READ_SPARM64 command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
dmaDMA buffer for the service parameters.
vpiVPI used to determine the WWN.
Returns
Returns the number of bytes written.

Definition at line 1067 of file sli4.c.

int32_t sli_cmd_read_status ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  clear_counters 
)

Write a READ_STATUS command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
clear_countersIf TRUE, the counters will be cleared.
Returns
Returns the number of bytes written.

Definition at line 707 of file sli4.c.

int32_t sli_cmd_read_topology ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_dma_t *  dma 
)

Write a READ_TOPOLOGY command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
dmaDMA buffer for loop map (optional).
Returns
Returns the number of bytes written.

Definition at line 1108 of file sli4.c.

int32_t sli_cmd_reg_fcfi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  index,
sli4_cmd_rq_cfg_t  rq_cfg[SLI4_CMD_REG_FCFI_NUM_RQ_CFG],
uint16_t  vlan_id 
)

Write a REG_FCFI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
indexFCF index returned by READ_FCF_TABLE.
rq_cfgRQ_ID/R_CTL/TYPE routing information
vlan_idVLAN ID tag.
Returns
Returns the number of bytes written.

Definition at line 1148 of file sli4.c.

int32_t sli_cmd_reg_rpi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  nport_id,
uint16_t  rpi,
uint16_t  vpi,
ocs_dma_t *  dma,
uint8_t  update,
uint8_t  enable_t10_pi,
uint8_t  hlm 
)

Write a REG_RPI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
nport_idRemote F/N_Port_ID.
rpiPreviously-allocated Remote Port Indicator.
vpiPreviously-allocated Virtual Port Indicator.
dmaDMA buffer that contains the remote port's service parameters.
updateBoolean indicating an update to an existing RPI (TRUE) or a new registration (FALSE).
hlmIndicating an RPI being used for HLM RPI
Returns
Returns the number of bytes written.

Definition at line 1315 of file sli4.c.

int32_t sli_cmd_reg_vfi ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_domain_t *  domain 
)

Write a REG_VFI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
domainPointer to the domain object.
Returns
Returns the number of bytes written.

If our advertised service parameter BB_SC_N is 0 or accept BB_SC_N is 0, send REG_VFI with BBCR set to 0

If the accept BB_SC_N value is greater than our maximum supported value (BBSCN_MAX from READ_CONFIG), then BBCR should not be enabled

Definition at line 1353 of file sli4.c.

int32_t sli_cmd_reg_vpi ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_sli_port_t *  sport,
uint8_t  update 
)

Write a REG_VPI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
sportPoint to SLI Port object.
updateBoolean indicating whether to update the existing VPI (true) or create a new VPI (false).
Returns
Returns the number of bytes written.

Definition at line 1423 of file sli4.c.

int32_t sli_cmd_release_xri ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint8_t  num_xri 
)

Write a RELEASE_XRI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
num_xriThe number of XRIs to be released.
Returns
Returns the number of bytes written.

Definition at line 939 of file sli4.c.

int32_t sli_cmd_sli_config ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint32_t  length,
ocs_dma_t *  dma 
)

Write a SLI_CONFIG command to the provided buffer.

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

Definition at line 1485 of file sli4.c.

int32_t sli_cmd_unreg_fcfi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  indicator 
)

Write a UNREG_FCFI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
indicatorIndicator value.
Returns
Returns the number of bytes written.

Definition at line 1570 of file sli4.c.

int32_t sli_cmd_unreg_rpi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  indicator,
sli4_resource_e  which,
uint32_t  fc_id 
)

Write an UNREG_RPI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
indicatorIndicator value.
whichType of unregister, such as node, port, domain, or FCF.
fc_idFC address.
Returns
Returns the number of bytes written.

Definition at line 1601 of file sli4.c.

int32_t sli_cmd_unreg_vfi ( sli4_t *  sli4,
void *  buf,
size_t  size,
ocs_domain_t *  domain,
uint32_t  which 
)

Write an UNREG_VFI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
domainPointer to the domain object
whichType of unregister, such as domain, FCFI, or everything.
Returns
Returns the number of bytes written.

Definition at line 1656 of file sli4.c.

int32_t sli_cmd_unreg_vpi ( sli4_t *  sli4,
void *  buf,
size_t  size,
uint16_t  indicator,
uint32_t  which 
)

Write an UNREG_VPI command to the provided buffer.

Parameters
sli4SLI context pointer.
bufVirtual pointer to the destination buffer.
sizeBuffer size, in bytes.
indicatorIndicator value.
whichType of unregister: port, domain, FCFI, everything
Returns
Returns the number of bytes written.

Definition at line 1701 of file sli4.c.

int32_t sli_cq_alloc_set ( sli4_t *  sli4,
sli4_queue_t *  qs[],
uint32_t  num_cqs,
uint32_t  n_entries,
sli4_queue_t *  eqs[] 
)

Allocate a c queue set.

Parameters
sli4SLI context.
num_cqsto create
qsPointers to the queue objects.
n_entriesNumber of entries to allocate per CQ.
eqsAssociated event queues
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 5172 of file sli4.c.

int32_t sli_cq_parse ( sli4_t *  sli4,
sli4_queue_t *  cq,
uint8_t *  cqe,
sli4_qentry_e *  etype,
uint16_t *  q_id 
)

Parse a CQ entry to retrieve the event type and the associated queue.

Parameters
sli4SLI context.
cqCQ to process.
cqePointer to the CQ entry.
etypeCQ event type.
q_idQueue ID associated with this completion message (that is, MQ_ID, RQ_ID, and so on).
Returns
  • 0 if call completed correctly and CQE status is SUCCESS.
  • -1 if call failed (no CQE status).
  • Other value if call completed correctly and return value is a CQE status value.

Definition at line 6046 of file sli4.c.

int32_t sli_cqe_async ( sli4_t *  sli4,
void *  buf 
)

Check the asynchronous event completion entry.

Parameters
sli4SLI context.
bufPointer to the ACQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 3586 of file sli4.c.

int32_t sli_cqe_mq ( void *  buf)

Check the mailbox/queue completion entry.

Parameters
bufPointer to the MCQE.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 3551 of file sli4.c.

int32_t sli_dump_is_present ( sli4_t *  sli4)

Read the SLIPORT_STATUS register to check if a dump is present.

Parameters
sli4SLI context.
Returns
  • 0 if call completed correctly and no dump is present.
  • 1 if call completed and dump is present.
  • -1 if call failed (unsupported chip).

Definition at line 6216 of file sli4.c.

int32_t sli_dump_is_ready ( sli4_t *  sli4)

Read the SLIPORT_STATUS register to to check if a dump is present.

Parameters
sli4SLI context.
Returns
  • 0 if the chip is not ready.
  • 1 if dd is present.
  • 2 if fdp is present.
  • 3 if dump won't be generated.
  • -1 if call failed (unsupported chip).

Definition at line 6142 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 5044 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 the EQ entry.
cq_idCQ_ID for this entry (only valid on success).
Returns
  • 0 if success.
  • < 0 if error.
  • > 0 if firmware detects EQ overflow.

Definition at line 6000 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 6283 of file sli4.c.

int32_t sli_fw_ready ( sli4_t *  sli4)

Determine if the chip FW is in a ready state.

Parameters
sli4SLI context.
Returns
  • 0 if call completed correctly and FW is not ready.
  • 1 if call completed correctly and FW is ready.
  • -1 if call failed.

Definition at line 6332 of file sli4.c.

int32_t sli_fw_reset ( sli4_t *  sli4)

Issue a Firmware Reset.

Description
Issues a Firmware Reset to the chip. This reset affects the entire chip, so all PCI function on the same PCI bus and device are affected.

This type of reset can be used to activate newly downloaded firmware.

The driver should be considered to be in an unknown state after this reset and should be reloaded.
Parameters
sli4SLI context.
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 4658 of file sli4.c.

int32_t sli_get_queue_entry_size ( sli4_t *  sli4,
uint32_t  qtype 
)

Get queue entry size.

Get queue entry size given queue type.

Parameters
sli4SLI context
qtypeType for which the entry size is returned.
Returns
Returns > 0 on success (queue entry size), or a negative value on failure.

Definition at line 4993 of file sli4.c.

int32_t sli_link_is_configurable ( sli4_t *  sli)

Determine if the link can be configured.

Parameters
sli4SLI context.
Returns
  • 0 if link is not configurable.
  • 1 if link is configurable.

Definition at line 6364 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 the queue object.
n_entriesNumber of entries to allocate.
assocAssociated queue (that is, the EQ for a CQ, the CQ for a MQ, and so on).
ulpThe ULP to bind, which is only used for WQ and RQs
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 5078 of file sli4.c.

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

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 5519 of file sli4.c.

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

Arm an EQ.

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

Definition at line 5492 of file sli4.c.

int32_t sli_queue_free ( sli4_t *  sli4,
sli4_queue_t *  q,
uint32_t  destroy_queues,
uint32_t  free_memory 
)

Free a queue.

Description
Frees DMA memory and de-registers the requested queue.
Parameters
sli4SLI context.
qPointer to the queue object.
destroy_queuesNon-zero if the mailbox commands should be sent to destroy the queues.
free_memoryNon-zero if the DMA memory associated with the queue should be freed.
Returns
Returns 0 on success, or -1 otherwise.

Definition at line 5335 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 the queue object.
Returns
Returns TRUE if empty, or FALSE otherwise.

Definition at line 5463 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 the queue object.
entryDestination pointer for the queue entry contents.
Returns
Returns 0 on success, or non-zero otherwise.

Definition at line 5720 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.

Note: Assumes the q->lock will be locked and released by the caller.

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

Definition at line 5645 of file sli4.c.

int32_t sli_raise_ue ( sli4_t *  sli4,
uint8_t  dump 
)

Cause chip to enter an unrecoverable error state.

Description
Cause chip to enter an unrecoverable error state. This is used when detecting unexpected FW behavior so FW can be halted from the driver as soon as error is detected.
Parameters
sli4SLI context.
dumpGenerate dump as part of reset.
Returns
Returns 0 if call completed correctly, or -1 if call failed (unsupported chip).

Definition at line 6092 of file sli4.c.

int32_t sli_reset_required ( sli4_t *  sli4)

Read the SLIPORT_STATUS register to check if the reset required is set.

Parameters
sli4SLI context.
Returns
  • 0 if call completed correctly and reset is not required.
  • 1 if call completed and reset is required.
  • -1 if call failed.

Definition at line 6253 of file sli4.c.

int32_t sli_resource_alloc ( sli4_t *  sli4,
sli4_resource_e  rtype,
uint32_t *  rid,
uint32_t *  index 
)

Allocate SLI Port resources.

Description
Allocate port-related resources, such as VFI, RPI, XRI, and so on. Resources are modeled using extents, regardless of whether the underlying device implements resource extents. If the device does not implement extents, the SLI layer models this as a single (albeit large) extent.
Parameters
sli4SLI context.
rtypeResource type (for example, RPI or XRI)
ridAllocated resource ID.
indexIndex into the bitmap.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 5851 of file sli4.c.

int32_t sli_resource_free ( sli4_t *  sli4,
sli4_resource_e  rtype,
uint32_t  rid 
)

Free the SLI Port resources.

Description
Free port-related resources, such as VFI, RPI, XRI, and so. See discussion of "extent" usage in sli_resource_alloc.
Parameters
sli4SLI context.
rtypeResource type (for example, RPI or XRI).
ridAllocated resource ID.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 5913 of file sli4.c.

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

Set up the SLI context.

Parameters
sli4SLI context.
osDevice abstraction.
port_typeProtocol type of port (for example, FC and NIC).
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 4452 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 4743 of file sli4.c.