Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Node State Machine: Remote Device States

Functions

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_d_initiate_shutdown (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Initiate node shutdown. More...
 
static void * __ocs_d_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 Device node state machine: Common device event handler. 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...
 
static void * __ocs_d_wait_del_ini_tgt (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 state: wait for node resume event More...
 
static void * __ocs_d_wait_del_node (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg)
 state: Wait for node resume event. 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_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...
 
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_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...
 

Function Details

static void * __ocs_d_common ( const char *  funcname,
ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)
static

Device node state machine: Common device event handler.

Description

For device nodes, this event handler manages default and common events.

Parameters
funcnameFunction name text.
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 237 of file ocs_device.c.

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

Description

State entered when a node is detected as being gone (absent from GID_PT).

Parameters
ctxRemote node state machine context.
evtEvent to process
argPer event optional argument
Returns
Returns NULL.

Definition at line 1886 of file ocs_device.c.

void* __ocs_d_device_ready ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

Device node state machine: Device is ready.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1728 of file ocs_device.c.

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.

Description

This state is entered when a node is instantiated, either having been discovered from a name services query, or having received a PLOGI/FLOGI.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
  • OCS_EVT_ENTER: (uint8_t *) - 1 to send a PLOGI on entry (initiator-only); 0 indicates a PLOGI is not sent on entry (initiator-only). Not applicable for a target.
Returns
Returns NULL.

Definition at line 811 of file ocs_device.c.

void* __ocs_d_initiate_shutdown ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)

Device node state machine: Initiate node shutdown.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 121 of file ocs_device.c.

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.

Description

This state is entered when a remote port has completed port login (PLOGI).

Parameters
ctxRemote node state machine context.
evtEvent to process
argPer event optional argument
Returns
Returns NULL.

Definition at line 1512 of file ocs_device.c.

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.

Description

Waits for the ADISC response from the remote node.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 2002 of file ocs_device.c.

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.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1451 of file ocs_device.c.

void * __ocs_d_wait_del_ini_tgt ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)
static

state: wait for node resume event

State is entered when a node is in I+T mode and sends a delete initiator/target call to the target-server/initiator-client and needs to wait for that work to complete.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argper event optional argument
Returns
returns NULL

Definition at line 335 of file ocs_device.c.

void * __ocs_d_wait_del_node ( ocs_sm_ctx_t *  ctx,
ocs_sm_event_t  evt,
void *  arg 
)
static

state: Wait for node resume event.

State is entered when a node sends a delete initiator/target call to the target-server/initiator-client and needs to wait for that work to complete.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 402 of file ocs_device.c.

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.

Description

Waits for a domain-attach complete ok event.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1243 of file ocs_device.c.

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.

Description

Waits for a LOGO accept completion.

Parameters
ctxRemote node state machine context.
evtEvent to process
argPer event optional argument
Returns
Returns NULL.

Definition at line 1686 of file ocs_device.c.

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.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 668 of file ocs_device.c.

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.

Description

State waits for a domain-attached completion while in loop topology.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 289 of file ocs_device.c.

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.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1364 of file ocs_device.c.

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.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 620 of file ocs_device.c.

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.

Description

State is entered when an initiator-capable node has sent a PLOGI and is waiting for a response.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1031 of file ocs_device.c.

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.

Description

State is entered when an initiator-capable node has sent a PLOGI and is waiting for a response. Before receiving the response, a PRLI was received, implying that the PLOGI was successful.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1164 of file ocs_device.c.

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.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 733 of file ocs_device.c.

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.

Description

Waits for topology notification from fabric node, then attaches domain and node.

Parameters
ctxRemote node state machine context.
evtEvent to process.
argPer event optional argument.
Returns
Returns NULL.

Definition at line 1293 of file ocs_device.c.

void ocs_d_send_prli_rsp ( ocs_io_t *  io,
uint16_t  ox_id,
uint8_t  fc_type 
)

Send response to PRLI.

Description

For device nodes, this function sends a PRLI response.

Parameters
ioPointer to a SCSI IO object.
ox_idOX_ID of PRLI
Returns
Returns None.

Definition at line 67 of file ocs_device.c.