Functions | |
| int32_t | ocs_scsi_send_rd_data (ocs_io_t *io, uint32_t flags, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint64_t wire_len, ocs_scsi_io_cb_t cb, void *arg) |
| Send read data. More... | |
| int32_t | ocs_scsi_recv_wr_data (ocs_io_t *io, uint32_t flags, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint64_t wire_len, ocs_scsi_io_cb_t cb, void *arg) |
| Prepare to receive write data. More... | |
| int32_t | ocs_scsi_send_resp (ocs_io_t *io, uint32_t flags, ocs_scsi_cmd_resp_t *rsp, ocs_scsi_io_cb_t cb, void *arg) |
| Send response data. More... | |
| int32_t | ocs_scsi_tgt_abort_io (ocs_io_t *io, bool send_abts, ocs_scsi_io_cb_t cb, void *arg) |
| Abort a target IO. More... | |
| int32_t | ocs_scsi_send_tmf_resp (ocs_io_t *io, ocs_scsi_tmf_resp_e rspcode, uint8_t *addl_rsp_info, ocs_scsi_io_cb_t cb, void *arg) |
| Send TMF response data. More... | |
| int32_t | ocs_iscsi_send_tmf_resp (ocs_io_t *io, uint8_t response, ocs_scsi_io_cb_t cb, void *arg) |
| send TMF response data More... | |
| int32_t | ocs_scsi_send_rd_io (ocs_node_t *node, ocs_io_t *io, uint32_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t len, ocs_scsi_rsp_io_cb_t cb, void *arg) |
| Initiate initiator read IO. More... | |
| int32_t | ocs_scsi_send_nodata_io (ocs_node_t *node, ocs_io_t *io, uint32_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_rsp_io_cb_t cb, void *arg) |
| Initiate initiator SCSI command with no data. More... | |
| int32_t | ocs_scsi_send_wr_io (ocs_node_t *node, ocs_io_t *io, uint32_t lun, void *cdb, uint32_t cdb_len, ocs_scsi_dif_info_t *dif_info, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t len, ocs_scsi_rsp_io_cb_t cb, void *arg) |
| Initiate initiator write IO. More... | |
| int32_t | ocs_scsi_send_tmf (ocs_node_t *node, ocs_io_t *io, ocs_io_t *io_to_abort, uint32_t lun, ocs_scsi_tmf_cmd_e tmf, ocs_scsi_sgl_t *sgl, uint32_t sgl_count, uint32_t len, ocs_scsi_rsp_io_cb_t cb, void *arg) |
| initiate initiator task management operation More... | |
| static int32_t | ocs_scsi_convert_dif_info (ocs_t *ocs, ocs_scsi_dif_info_t *scsi_dif_info, ocs_hal_dif_info_t *hal_dif_info) |
| Convert SCSI API T10 DIF information into the FC HAL format. More... | |
| void | ocs_scsi_io_complete (ocs_io_t *io) |
| Notify base that IO is complete. More... | |
| uint32_t | ocs_scsi_get_property (ocs_t *ocs, ocs_scsi_property_e prop) |
| Return SCSI API integer valued property. More... | |
| void * | ocs_scsi_get_property_ptr (ocs_t *ocs, ocs_scsi_property_e prop) |
| return a property pointer. More... | |
| ocs_io_t * | ocs_scsi_io_alloc (ocs_node_t *node, ocs_scsi_io_role_e role) |
| allocate a SCSI IO context. More... | |
| void | ocs_scsi_io_free (ocs_io_t *io) |
| Free a SCSI IO context. More... | |
| int32_t ocs_iscsi_send_tmf_resp | ( | ocs_io_t * | io, |
| uint8_t | response, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
send TMF response data
| io | Pointer to IO context. |
| response | The iSCSI task management response code. |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1320 of file ocs_scsi.c.
|
static |
Convert SCSI API T10 DIF information into the FC HAL format.
| ocs | Pointer to the ocs structure for logging. |
| scsi_dif_info | Pointer to the SCSI API T10 DIF fields. |
| hal_dif_info | Pointer to the FC HAL API T10 DIF fields. |
Definition at line 1932 of file ocs_scsi.c.
| uint32_t ocs_scsi_get_property | ( | ocs_t * | ocs, |
| ocs_scsi_property_e | prop | ||
| ) |
Return SCSI API integer valued property.
| ocs | Pointer to ocs. |
| prop | Property value to return. |
Definition at line 2048 of file ocs_scsi.c.
| void* ocs_scsi_get_property_ptr | ( | ocs_t * | ocs, |
| ocs_scsi_property_e | prop | ||
| ) |
return a property pointer.
| ocs | Pointer to ocs. |
| prop | Property value to return. |
Definition at line 2119 of file ocs_scsi.c.
| ocs_io_t* ocs_scsi_io_alloc | ( | ocs_node_t * | node, |
| ocs_scsi_io_role_e | role | ||
| ) |
allocate a SCSI IO context.
node. This function is called by initiator-clients when issuing SCSI commands to remote target devices. On completion, ocs_scsi_io_free() is called. | node | Pointer to associated node structure. |
| role | Role for IO (originator/responder). |
Definition at line 2187 of file ocs_scsi.c.
| void ocs_scsi_io_complete | ( | ocs_io_t * | io | ) |
Notify base that IO is complete.
| io | Pointer to IO context. |
Definition at line 2023 of file ocs_scsi.c.
| void ocs_scsi_io_free | ( | ocs_io_t * | io | ) |
Free a SCSI IO context.
| io | Pointer to IO context. |
Definition at line 2264 of file ocs_scsi.c.
| int32_t ocs_scsi_recv_wr_data | ( | ocs_io_t * | io, |
| uint32_t | flags, | ||
| ocs_scsi_dif_info_t * | dif_info, | ||
| ocs_scsi_sgl_t * | sgl, | ||
| uint32_t | sgl_count, | ||
| uint64_t | wire_len, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Prepare to receive write data.
This function is used by the target-server to set up a SCSI write data phase, transferring data from the remote initiator to the target. The payload is specified by the scatter-gather list sgl of length sgl_count. The len argument specifies the payload length (independent of the scatter-gather list cumulative length).
The flags argument has one bit: OCS_SCSI_LAST_DATAPHASE, which is a hint to the base driver that it may use auto SCSI response features if the hardware supports it.
Upon completion the callback function cb is called with flags indicating that the IO has completed (OCS_SCSI_IO_COMPL) and another dataphase or response may be sent, the IO has completed and no response needs to be sent (OCS_SCSI_IO_COMPL_NO_RSP), or that the IO was aborted (OCS_SCSI_IO_ABORTED).
| io | Pointer to IO context. |
| flags | Flags controlling the receipt of data. |
| dif_info | Pointer to a T10 PI (DIF) information structure. |
| sgl | Pointer to payload scatter-gather list. |
| sgl_count | Number of scatter-gather list elements. |
| wire_len | Length of the payload on wire, in bytes. |
| cb | Completion callback. |
| arg | Application supplied callback data. |
Definition at line 960 of file ocs_scsi.c.
| int32_t ocs_scsi_send_nodata_io | ( | ocs_node_t * | node, |
| ocs_io_t * | io, | ||
| uint32_t | lun, | ||
| void * | cdb, | ||
| uint32_t | cdb_len, | ||
| ocs_scsi_rsp_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Initiate initiator SCSI command with no data.
| node | Pointer to node. |
| io | Pointer to IO context. |
| lun | LUN value. |
| cdb | Pointer to CDB. |
| cdb_len | Length of CDB. |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1724 of file ocs_scsi.c.
| int32_t ocs_scsi_send_rd_data | ( | ocs_io_t * | io, |
| uint32_t | flags, | ||
| ocs_scsi_dif_info_t * | dif_info, | ||
| ocs_scsi_sgl_t * | sgl, | ||
| uint32_t | sgl_count, | ||
| uint64_t | wire_len, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Send read data.
sgl of length sgl_count. The len argument specifies the payload length (independent of the scatter-gather list cumulative length). cb is called with flags indicating that the IO has completed (OCS_SCSI_IO_COMPL) and another dataphase or response may be sent, the IO has completed and no response needs to be sent (OCS_SCSI_IO_COMPL_NO_RSP), or that the IO was aborted (OCS_SCSI_IO_ABORTED).| io | Pointer to IO context. |
| flags | Flags controlling the sending of data. |
| dif_info | Pointer to a T10 PI (DIF) information structure. |
| sgl | Pointer to payload scatter-gather list. |
| sgl_count | Number of scatter-gather list elements. |
| wire_len | Length of the payload on wire, in bytes. |
| cb | Completion callback. |
| arg | Application supplied callback data. |
Definition at line 764 of file ocs_scsi.c.
| int32_t ocs_scsi_send_rd_io | ( | ocs_node_t * | node, |
| ocs_io_t * | io, | ||
| uint32_t | lun, | ||
| void * | cdb, | ||
| uint32_t | cdb_len, | ||
| ocs_scsi_dif_info_t * | dif_info, | ||
| ocs_scsi_sgl_t * | sgl, | ||
| uint32_t | sgl_count, | ||
| uint32_t | len, | ||
| ocs_scsi_rsp_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Initiate initiator read IO.
sgl for sgl_count entries. | node | Pointer to node. |
| io | Pointer to IO context. |
| lun | LUN value. |
| cdb | Pointer to CDB. |
| cdb_len | Length of CDB. |
| dif_info | Pointer to a T10 PI (DIF) information structure. |
| sgl | Pointer to scatter-gather list. |
| sgl_count | Count of scatter-gather list elements. |
| len | Length of payload. |
| cb | Completion callback. |
| arg | Application-specified completion callback argument. |
Definition at line 1693 of file ocs_scsi.c.
| int32_t ocs_scsi_send_resp | ( | ocs_io_t * | io, |
| uint32_t | flags, | ||
| ocs_scsi_cmd_resp_t * | rsp, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Send response data.
cb . The target-server will generally clean up its IO context resources and call ocs_scsi_io_complete().| io | Pointer to IO context. |
| flags | Flags to control sending of SCSI response. |
| rsp | Pointer to response data populated by caller. |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1079 of file ocs_scsi.c.
| int32_t ocs_scsi_send_tmf | ( | ocs_node_t * | node, |
| ocs_io_t * | io, | ||
| ocs_io_t * | io_to_abort, | ||
| uint32_t | lun, | ||
| ocs_scsi_tmf_cmd_e | tmf, | ||
| ocs_scsi_sgl_t * | sgl, | ||
| uint32_t | sgl_count, | ||
| uint32_t | len, | ||
| ocs_scsi_rsp_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
initiate initiator task management operation
sgl_count may be zero and sgl is ignored. | node | Pointer to node. |
| io | Pointer to IO context. |
| io_to_abort | Pointer to IO context to be aborted. |
| lun | LUN value. |
| tmf | Task management function. |
| sgl | Pointer to scatter-gather list. |
| sgl_count | Count of scatter-gather list elements. |
| len | Length of payload. |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1910 of file ocs_scsi.c.
| int32_t ocs_scsi_send_tmf_resp | ( | ocs_io_t * | io, |
| ocs_scsi_tmf_resp_e | rspcode, | ||
| uint8_t * | addl_rsp_info, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Send TMF response data.
cb. The target-server will generally clean up its IO context resources and call ocs_scsi_io_complete().| io | Pointer to IO context. |
| rspcode | TMF response code. |
| addl_rsp_info | Additional TMF response information (may be NULL for zero data). |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1270 of file ocs_scsi.c.
| int32_t ocs_scsi_send_wr_io | ( | ocs_node_t * | node, |
| ocs_io_t * | io, | ||
| uint32_t | lun, | ||
| void * | cdb, | ||
| uint32_t | cdb_len, | ||
| ocs_scsi_dif_info_t * | dif_info, | ||
| ocs_scsi_sgl_t * | sgl, | ||
| uint32_t | sgl_count, | ||
| uint32_t | len, | ||
| ocs_scsi_rsp_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Initiate initiator write IO.
sgl for sgl_count. entries. | node | Pointer to node. |
| io | Pointer to IO context. |
| lun | LUN value. |
| cdb | Pointer to CDB. |
| cdb_len | Length of CDB. |
| dif_info | Pointer to a T10 PI (DIF) information structure. |
| sgl | Pointer to scatter-gather list. |
| sgl_count | Count of scatter-gather list elements. |
| len | Length of payload. |
| cb | Completion callback. |
| arg | Application specified completion callback argument. |
Definition at line 1761 of file ocs_scsi.c.
| int32_t ocs_scsi_tgt_abort_io | ( | ocs_io_t * | io, |
| bool | send_abts, | ||
| ocs_scsi_io_cb_t | cb, | ||
| void * | arg | ||
| ) |
Abort a target IO.
| io | IO context. |
| cb | SCSI target server callback. |
| arg | SCSI target server supplied callback argument. |
Definition at line 1201 of file ocs_scsi.c.