Emulex Logo
OneCoreā„¢ Storage SDK Release 11.2
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Unsolicited Frame Handling

Functions

static int32_t ocs_unsol_abort_cb (ocs_hal_io_t *hio, ocs_remote_node_t *rnode, uint32_t len, int32_t status, uint32_t ext, void *arg)
 Callback function when aborting a port owned XRI exchanges. More...
 
static void ocs_port_owned_abort (ocs_t *ocs, ocs_hal_io_t *hio)
 Abort either a RQ Pair auto XFER RDY XRI. More...
 
int32_t ocs_unsolicited_cb (void *arg, ocs_hal_sequence_t *seq)
 Handle unsolicited FC frames. More...
 
static int32_t ocs_unsol_process (ocs_t *ocs, ocs_hal_sequence_t *seq)
 Handle unsolicited FC frames. More...
 
int32_t ocs_process_node_pending (ocs_node_t *node)
 Process pending frames queued to the given node. More...
 
int32_t ocs_domain_process_pending (ocs_domain_t *domain)
 Process pending frames queued to the given domain. More...
 
static int32_t ocs_purge_pending (ocs_t *ocs, ocs_list_t *pend_list, ocs_lock_t *list_lock)
 Purge given pending list. More...
 
int32_t ocs_node_purge_pending (ocs_node_t *node)
 Purge node's pending (queued) frames. More...
 
int32_t ocs_domain_purge_pending (ocs_domain_t *domain)
 Purge xport's pending (queued) frames. More...
 
static uint8_t ocs_node_frames_held (void *arg)
 Check if node's pending frames are held. More...
 
static uint8_t ocs_domain_frames_held (void *arg)
 Check if domain's pending frames are held. More...
 
void ocs_domain_hold_frames (ocs_domain_t *domain)
 Globally (at xport level) hold unsolicited frames. More...
 
void ocs_domain_accept_frames (ocs_domain_t *domain)
 Clear hold on unsolicited frames. More...
 
static int32_t ocs_domain_dispatch_frame (void *arg, ocs_hal_sequence_t *seq)
 Dispatch unsolicited FC frame. More...
 
static int32_t ocs_node_dispatch_frame (void *arg, ocs_hal_sequence_t *seq)
 Dispatch a frame. More...
 
static void ocs_dispatch_unsolicited_tmf (ocs_io_t *io, uint8_t task_management_flags, ocs_node_t *node, uint32_t lun)
 Dispatch unsolicited FCP frames (RQ Pair). More...
 
static int32_t ocs_dispatch_fcp_cmd (ocs_node_t *node, ocs_hal_sequence_t *seq)
 Dispatch unsolicited FCP_CMND frame. More...
 
static int32_t ocs_dispatch_tow_fcp_cmd (ocs_node_t *node, ocs_hal_sequence_t *seq)
 Dispatch unsolicited FCP_CMND frame. More...
 
static int32_t ocs_dispatch_fcp_data (ocs_node_t *node, ocs_hal_sequence_t *seq)
 Dispatch FCP data frames for TOW. More...
 
static int32_t ocs_fc_tmf_rejected_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg)
 Handle the callback for the TMF FUNCTION_REJECTED response. More...
 
static uint32_t ocs_fc_decode_lun (uint8_t *lu)
 Decode a LU Number according to SAM. More...
 

Function Details

static int32_t ocs_dispatch_fcp_cmd ( ocs_node_t *  node,
ocs_hal_sequence_t *  seq 
)
static

Dispatch unsolicited FCP_CMND frame.

Description

Dispatch unsolicited FCP_CMND frame. RQ Pair mode - always used for RQ Pair mode since first burst is not supported.

Parameters
nodeNode that originated the frame.
seqHeader/payload sequence buffers.
Returns
Returns 0 if frame processed and RX buffers cleaned up appropriately, -1 if frame not handled and RX buffers need to be returned.

Definition at line 894 of file ocs_unsol.c.

static int32_t ocs_dispatch_fcp_data ( ocs_node_t *  node,
ocs_hal_sequence_t *  seq 
)
static

Dispatch FCP data frames for TOW.

Description

Dispatch unsolicited FCP data frames containing sequence initiative transferred (SIT=1).

Parameters
nodeNode that originated the frame.
seqHeader/payload sequence buffers.
Returns
Returns 0 if frame processed and RX buffers cleaned up appropriately, -1 if frame not handled.

Definition at line 1082 of file ocs_unsol.c.

static int32_t ocs_dispatch_tow_fcp_cmd ( ocs_node_t *  node,
ocs_hal_sequence_t *  seq 
)
static

Dispatch unsolicited FCP_CMND frame.

Description

Dispatch unsolicited FCP_CMND frame that is assisted with TOW.

Parameters
nodeNode that originated the frame.
seqHeader/payload sequence buffers.
Returns
Returns 0 if frame processed and RX buffers cleaned up appropriately, -1 if frame not handled and RX buffers need to be returned.

Definition at line 991 of file ocs_unsol.c.

static void ocs_dispatch_unsolicited_tmf ( ocs_io_t *  io,
uint8_t  task_management_flags,
ocs_node_t *  node,
uint32_t  lun 
)
static

Dispatch unsolicited FCP frames (RQ Pair).

Description

Dispatch unsolicited FCP frames (called from the device node state machine).

Parameters
ioPointer to the IO context.
task_management_flagsTask management flags from the FCP_CMND frame.
nodeNode that originated the frame.
lun32-bit LUN from FCP_CMND frame.
Returns
Returns None.

Definition at line 770 of file ocs_unsol.c.

void ocs_domain_accept_frames ( ocs_domain_t *  domain)

Clear hold on unsolicited frames.

Description

This function clears the hold on processing unsolicited FC frames queued to the domain pending list.

Parameters
domainPointer to domain object.
Returns
Returns None.

Definition at line 546 of file ocs_unsol.c.

static __inline int32_t ocs_domain_dispatch_frame ( void *  arg,
ocs_hal_sequence_t *  seq 
)
static

Dispatch unsolicited FC frame.

Description

This function processes an unsolicited FC frame queued at the domain level.

Parameters
argPointer to ocs object.
seqHeader/payload sequence buffers.
Returns
Returns 0 if frame processed and RX buffers cleaned up appropriately, -1 if frame not handled.

Definition at line 578 of file ocs_unsol.c.

static uint8_t ocs_domain_frames_held ( void *  arg)
static

Check if domain's pending frames are held.

Parameters
argDomain for which the pending frame hold condition is checked.
Returns
Returns 1 if domain is holding pending frames, or 0 if not.

Definition at line 492 of file ocs_unsol.c.

void ocs_domain_hold_frames ( ocs_domain_t *  domain)

Globally (at xport level) hold unsolicited frames.

Description

This function places a hold on processing unsolicited FC frames queued to the xport pending list.

Parameters
domainPointer to domain object.
Returns
Returns None.

Definition at line 518 of file ocs_unsol.c.

int32_t ocs_domain_process_pending ( ocs_domain_t *  domain)

Process pending frames queued to the given domain.

Description

Frames that are queued for the domain are dispatched and returned to the RQ.

Parameters
domainDomain of the queued frames that are to be dispatched.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 336 of file ocs_unsol.c.

int32_t ocs_domain_purge_pending ( ocs_domain_t *  domain)

Purge xport's pending (queued) frames.

Description

Frames that are queued for the xport are discarded and returned to the RQ.

Parameters
domainPointer to domain object.
Returns
Returns 0 on success; or a negative error value on failure.

Definition at line 450 of file ocs_unsol.c.

static uint32_t ocs_fc_decode_lun ( uint8_t *  lu)
static

Decode a LU Number according to SAM.

Description

Decode a LU Number according to SAM. Note: Only handles a single-level LU.

Parameters
luPointer to the LU data.
Returns
Returns the LU Number; or the maximum integer on error.

Definition at line 1188 of file ocs_unsol.c.

static int32_t ocs_fc_tmf_rejected_cb ( ocs_io_t *  io,
ocs_scsi_io_status_e  scsi_status,
uint32_t  flags,
void *  arg 
)
static

Handle the callback for the TMF FUNCTION_REJECTED response.

Description

Handle the callback of a send TMF FUNCTION_REJECTED response request.

Parameters
ioPointer to the IO context.
scsi_statusStatus of the response.
flagsCallback flags.
argCallback argument.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 1166 of file ocs_unsol.c.

static int32_t ocs_node_dispatch_frame ( void *  arg,
ocs_hal_sequence_t *  seq 
)
static

Dispatch a frame.

Description

A frame is dispatched from the node to the handler.

Parameters
argNode that originated the frame.
seqHeader/payload sequence buffers.
Returns
Returns 0 if frame processed and RX buffers cleaned up appropriately, -1 if frame not handled.

Definition at line 681 of file ocs_unsol.c.

static uint8_t ocs_node_frames_held ( void *  arg)
static

Check if node's pending frames are held.

Parameters
argNode for which the pending frame hold condition is checked.
Returns
Returns 1 if node is holding pending frames, or 0 if not.

Definition at line 474 of file ocs_unsol.c.

int32_t ocs_node_purge_pending ( ocs_node_t *  node)

Purge node's pending (queued) frames.

Description

Frames that are queued for the node are discarded and returned to the RQ.

Parameters
nodeNode of the queued frames that are to be discarded.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 431 of file ocs_unsol.c.

static void ocs_port_owned_abort ( ocs_t *  ocs,
ocs_hal_io_t *  hio 
)
static

Abort either a RQ Pair auto XFER RDY XRI.

Returns
Returns None.

Definition at line 136 of file ocs_unsol.c.

int32_t ocs_process_node_pending ( ocs_node_t *  node)

Process pending frames queued to the given node.

Description

Frames that are queued for the node are dispatched and returned to the RQ.

Parameters
nodeNode of the queued frames that are to be dispatched.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 278 of file ocs_unsol.c.

static int32_t ocs_purge_pending ( ocs_t *  ocs,
ocs_list_t *  pend_list,
ocs_lock_t *  list_lock 
)
static

Purge given pending list.

Description

Frames that are queued on the given pending list are discarded and returned to the RQ.

Parameters
ocsPointer to ocs object.
pend_listPending list to be purged.
list_lockLock that protects pending list.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 397 of file ocs_unsol.c.

static int32_t ocs_unsol_abort_cb ( ocs_hal_io_t *  hio,
ocs_remote_node_t *  rnode,
uint32_t  len,
int32_t  status,
uint32_t  ext,
void *  arg 
)
static

Callback function when aborting a port owned XRI exchanges.

Returns
Returns 0.

Definition at line 119 of file ocs_unsol.c.

static int32_t ocs_unsol_process ( ocs_t *  ocs,
ocs_hal_sequence_t *  seq 
)
static

Handle unsolicited FC frames.

Description

This function is called either from ocs_unsolicited_cb() or ocs_unsol_rq_thread().

Parameters
ocsPointer to the ocs structure.
seqHeader/payload sequence buffers.
Returns
Returns 0 on success, or a negative error value on failure.

Definition at line 203 of file ocs_unsol.c.

int32_t ocs_unsolicited_cb ( void *  arg,
ocs_hal_sequence_t *  seq 
)

Handle unsolicited FC frames.

Description

This function is called from the HAL with unsolicited FC frames (FCP, ELS, BLS, etc.).

Parameters
argApplication-specified callback data.
seqHeader/payload sequence buffers.
Returns
Returns 0 on success; or a negative error value on failure.

Definition at line 164 of file ocs_unsol.c.