Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ocs_device.h File Reference

Go to the source code of this file.

Detailed Description

Node state machine functions for remote device node sm

Definition in file ocs_device.h.

Functions

void ocs_node_init_device (ocs_node_t *node, int send_plogi)
 Initialize device node. More...
 
void ocs_process_prli_payload (ocs_node_t *node, fc_prli_payload_t *prli)
 Process the PRLI payload. More...
 
void ocs_d_send_prli_rsp (ocs_io_t *io, uint16_t ox_id, uint8_t fc_type)
 Send response to PRLI. More...
 
void ocs_send_ls_acc_after_attach (ocs_io_t *io, fc_header_t *hdr, ocs_node_send_ls_acc_e ls)
 Save the OX_ID for sending LS_ACC sometime later. More...
 
void * __ocs_d_wait_loop (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for a domain-attach completion in loop topology. More...
 
void * __ocs_d_wait_plogi_acc_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for the PLOGI accept to complete. More...
 
void * __ocs_d_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Initial node state for an initiator or a target. More...
 
void * __ocs_d_wait_plogi_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait on a response for a sent PLOGI. More...
 
void * __ocs_d_wait_plogi_rsp_recvd_prli (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Waiting on a response for a sent PLOGI. More...
 
void * __ocs_d_wait_domain_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for a domain attach. More...
 
void * __ocs_d_wait_topology_notify (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for topology notification. More...
 
void * __ocs_d_wait_node_attach (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for a node attach when found by a remote node. More...
 
void * __ocs_d_wait_attach_evt_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for a node/domain attach then shutdown node. More...
 
void * __ocs_d_initiate_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Initiate node shutdown. More...
 
void * __ocs_d_port_logged_in (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Port is logged in. More...
 
void * __ocs_d_wait_logo_acc_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for a LOGO accept. More...
 
void * __ocs_d_device_ready (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Device is ready. More...
 
void * __ocs_d_device_gone (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Node is gone (absent from GID_PT). More...
 
void * __ocs_d_wait_adisc_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for the ADISC response. More...
 
void * __ocs_d_wait_logo_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for the LOGO response. More...
 
void * __ocs_d_wait_prlo_rsp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Wait for the PRLO response. More...
 

Function Details

void ocs_node_init_device ( ocs_node_t *  node,
int  send_plogi 
)

Initialize device node.

Initialize device node. If a node is an initiator, then send a PLOGI and transition to __ocs_d_wait_plogi_rsp, otherwise transition to __ocs_d_init.

Parameters
nodePointer to the node object.
send_plogiBoolean indicating to send PLOGI command or not.
Returns
none

Definition at line 781 of file ocs_device.c.

void ocs_process_prli_payload ( ocs_node_t *  node,
fc_prli_payload_t *  prli 
)

Process the PRLI payload.

Description

The PRLI payload is processed; the initiator/target capabilities of the remote node are extracted and saved in the node object.

Parameters
nodePointer to the node object.
prliPointer to the PRLI payload.
Returns
None.

Definition at line 518 of file ocs_device.c.

void ocs_send_ls_acc_after_attach ( ocs_io_t *  io,
fc_header_t *  hdr,
ocs_node_send_ls_acc_e  ls 
)

Save the OX_ID for sending LS_ACC sometime later.

Description

When deferring the response to an ELS request, the OX_ID of the request is saved using this function.

Parameters
ioPointer to a SCSI IO object.
hdrPointer to the FC header.
lsDefines the type of ELS to send: LS_ACC, LS_ACC for PLOGI; or LSS_ACC for PRLI.
Returns
None.

Definition at line 475 of file ocs_device.c.