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

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)
 Set up 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...
 
static void ocs_hal_ctx_cleanup (ocs_hal_t *hal)
 Free the command contents. More...
 
static void ocs_hal_cxn_cleanup (ocs_list_t *list)
 Free the connection tracking structures. More...
 
ocs_hal_rtn_e ocs_hal_teardown (ocs_hal_t *hal)
 Tear down Hardware Abstraction Layer module. 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 otherwise.

Definition at line 2203 of file ocs_hal.c.

static void ocs_hal_ctx_cleanup ( ocs_hal_t *  hal)
static

Free the command contents.

Description
Frees the command contest structures
Parameters
halHardware context allocated by caller.

Definition at line 2348 of file ocs_hal.c.

static void ocs_hal_cxn_cleanup ( ocs_list_t *  list)
static

Free the connection tracking structures.

Description
Frees the connection tracking structures
Parameters
listPointer to the linked list to clean up.

Definition at line 2382 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_init ( ocs_hal_t *  hal)

Set up Hardware Abstraction Layer module.

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

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

Definition at line 201 of file ocs_hal.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 caller.
osDevice abstraction.
port_typeProtocol type of port (e.g. FC, NIC, ...).
Returns
Returns 0 on success, or a non-zero value otherwise.

Definition at line 100 of file ocs_hal.c.

ocs_hal_rtn_e ocs_hal_teardown ( ocs_hal_t *  hal)

Tear down Hardware Abstraction Layer module.

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

Definition at line 2409 of file ocs_hal.c.