Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Device Initialization and Shutdown

Functions

static ocs_hal_rtn_e ocs_hal_read_max_dump_size (ocs_hal_t *hal)
 Read the max dump size for this port. More...
 
ocs_hal_rtn_e ocs_hal_setup (ocs_hal_t *hal, ocs_os_handle_t os, sli4_port_type_e port_type)
 Set up the Hardware Abstraction Layer module. More...
 
ocs_hal_rtn_e ocs_hal_init (ocs_hal_t *hal)
 Allocate memory structures to prepare for the device operation. More...
 
ocs_hal_rtn_e ocs_hal_teardown (ocs_hal_t *hal)
 Tear down the Hardware Abstraction Layer module. More...
 
ocs_hal_rtn_e ocs_hal_callback (ocs_hal_t *hal, ocs_hal_callback_e which, void *func, void *arg)
 Register a callback for the given event. More...
 
ocs_hal_rtn_e ocs_hal_rqpair_tow_buffer_alloc (ocs_hal_t *hal, uint32_t num_buffers)
 Allocate tow buffers. More...
 
static void ocs_hal_rqpair_tow_dnrx_check (ocs_hal_t *hal)
 Post Auto xfer rdy buffers to the XRIs posted with DNRX. More...
 

Attach an TOW XRI buffer to an IO

Description
Puts the data SGL into the SGL list for the IO object
Note: io_lock must be held.
Parameters
halHardware context allocated by the caller.
ioPointer to the IO object.
Returns
Returns the value of DNRX bit in the TRSP and ABORT WQEs.
static void ocs_hal_rqpair_tow_buffer_free (ocs_hal_t *hal)
 Free tow buffers. More...
 
ocs_hal_rtn_e ocs_hal_rqpair_init (ocs_hal_t *hal)
 Configure the rq_pair function from ocs_hal_init(). Must be after the IOs are setup and the state is active. More...
 
void ocs_hal_rqpair_teardown (ocs_hal_t *hal)
 Tear down the rq_pair function from ocs_hal_teardown(). More...
 

Function Details

ocs_hal_rtn_e ocs_hal_callback ( ocs_hal_t *  hal,
ocs_hal_callback_e  which,
void *  func,
void *  arg 
)

Register a callback for the given event.

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

Definition at line 2824 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_init ( ocs_hal_t *  hal)

Allocate memory structures to prepare for the device operation.

Description
Allocates memory structures needed by the device and prepares the device for operation.

Note: This function may be called more than once (for example, at initialization and then after a reset), but the size of the internal resources may not be changed without tearing down the HAL (ocs_hal_teardown()).
Parameters
halHardware context allocated by the caller.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 813 of file ocs_hal.c.

static ocs_hal_rtn_e ocs_hal_read_max_dump_size ( ocs_hal_t *  hal)
static

Read the max dump size for this port.

Description
Queries the FW for the maximum dump size
Parameters
halHardware context allocated by the caller.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 420 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_rqpair_init ( ocs_hal_t *  hal)

Configure the rq_pair function from ocs_hal_init(). Must be after the IOs are setup and the state is active.

Description
Allocates the TOW buffers and posts initial XRIs for this feature.
Parameters
halHardware context allocated by the caller.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 918 of file ocs_hal_rqpair.c.

void ocs_hal_rqpair_teardown ( ocs_hal_t *  hal)

Tear down the rq_pair function from ocs_hal_teardown().

Description
Frees the buffers to TOW buffers.
Parameters
halHardware context allocated by the caller.

Definition at line 967 of file ocs_hal_rqpair.c.

ocs_hal_rtn_e ocs_hal_rqpair_tow_buffer_alloc ( ocs_hal_t *  hal,
uint32_t  num_buffers 
)

Allocate tow buffers.

Description
Allocates the tow buffers and places them on the free list.
Parameters
halHardware context allocated by the caller.
num_buffersNumber of buffers to allocate.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 587 of file ocs_hal_rqpair.c.

static void ocs_hal_rqpair_tow_buffer_free ( ocs_hal_t *  hal)
static

Free tow buffers.

Description
Frees the tow buffers.
Parameters
halHardware context allocated by the caller.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 886 of file ocs_hal_rqpair.c.

static void ocs_hal_rqpair_tow_dnrx_check ( ocs_hal_t *  hal)
static

Post Auto xfer rdy buffers to the XRIs posted with DNRX.

Description
When new buffers are freed, check existing XRIs waiting for buffers.
Parameters
halHardware context allocated by the caller.

Definition at line 644 of file ocs_hal_rqpair.c.

ocs_hal_rtn_e ocs_hal_setup ( ocs_hal_t *  hal,
ocs_os_handle_t  os,
sli4_port_type_e  port_type 
)

Set up the Hardware Abstraction Layer module.

Description
Calls set up to configure the hardware.
Parameters
halHardware context allocated by the caller.
osDevice abstraction.
port_typeProtocol type of port, such as FC and NIC.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 606 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_teardown ( ocs_hal_t *  hal)

Tear down the Hardware Abstraction Layer module.

Description
Frees memory structures needed by the device, and shuts down the device. Does not free the HAL context memory (which is done by the caller).
Parameters
halHardware context allocated by the caller.
Returns
Returns 0 on success, or a non-zero value on failure.

Definition at line 1446 of file ocs_hal.c.