|
| static void * | __ocs_ramd_io_init (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Initial IO state. More...
|
| |
| static void * | __ocs_ramd_io_init_err_injection (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Initial IO state with error injection enabled. More...
|
| |
| static void * | __ocs_ramd_io_wait_first_burst (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Waiting for first burst data. More...
|
| |
| static void * | __ocs_ramd_io_common (const char *funcname, ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Common IO event handler. More...
|
| |
| static void * | __ocs_ramd_io_wait_dataphase_compl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait for the data phase to complete. More...
|
| |
| static void * | __ocs_ramd_io_wait_and_validate_dataphase (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait for the data phase to complete, then validate the received data. More...
|
| |
| static void * | __ocs_ramd_io_wait_and_complete_writesame_dataphase (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait for the data phase to complete following a WRITE SAME command. More...
|
| |
| static void * | __ocs_ramd_io_wait_resp_compl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait for the response to complete. More...
|
| |
| static void * | __ocs_ramd_io_aborting (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Aborting IO. More...
|
| |
| static void * | __ocs_ramd_io_aborting_wait_io_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Aborting IO. More...
|
| |
| static void * | __ocs_ramd_io_aborting_wait_abort_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Aborting IO. More...
|
| |
| static void * | __ocs_ramd_tmf_wait_resp_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait for the TMF response to complete. More...
|
| |
| static void * | __ocs_ramd_abts_wait_io_abort_resp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: ABTS: Wait for the IO to be aborted, and send response. More...
|
| |
| static void * | __ocs_ramd_wait_abts_acc_cmpl (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: ABTS: Wait for the BA_ACC to complete. More...
|
| |
| static void * | __ocs_ramd_io_wait_first_burst_send_resp (ocs_sm_ctx_t *ctx, ocs_sm_event_t evt, void *arg) |
| | State: Wait on first burst then send response. More...
|
| |
| static int32_t | ocs_ramd_data_phase_start (ocs_io_t *io) |
| | Common code to start a SCSI data phase once the IO has been set up. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write6 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE (6) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write12 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE (12) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write32 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE (32) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_long10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE LONG (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_long16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE LONG (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_same10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE SAME (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_same16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE SAME (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_same32 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI WRITE SAME (32) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read6 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ (6) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read12 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ (12) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read32 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ (32) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_long10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ LONG (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_long16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ LONG (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_inquiry (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI INQUIRY command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_test_unit_ready (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI TEST UNIT READY command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_reserve_release (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI RESERVE or RELEASE command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_capacity10 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ CAPACITY (10) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_capacity16 (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI READ CAPACITY (16) command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_report_luns (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI REPORT LUNS command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_format_unit (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI FORMAT UNIT command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_mode_select (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI MODE SELECT command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_request_sense (ocs_io_t *io, uint8_t cdb[]) |
| | Process the SCSI REQUEST SENSE command. More...
|
| |
| static int32_t | ocs_ramd_abort_node_tasks (ocs_node_t *node, ocs_io_t *myio) |
| | Abort all tasks associated with a node. More...
|
| |
| static int32_t | ocs_ramd_abort_node_tasks_lun (ocs_node_t *node, uint32_t lun, ocs_io_t *myio) |
| | Abort tasks associated with a given node and LUN. More...
|
| |
| static uint32_t | scsi_validate_format_unit (ocs_io_t *io) |
| | Validate a FORMAT UNIT parameter list. More...
|
| |
| static int32_t | scsi_format_unit_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Command data phase callback for the FORMAT UNIT command. More...
|
| |
| static uint32_t | scsi_validate_mode_select (ocs_io_t *io) |
| | Validate a MODE SELECT parameter list. More...
|
| |
| static int32_t | scsi_mode_select_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Command data phase callback for the MODE SELECT command. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_complete_write_same (ocs_io_t *io) |
| | Command completion for the SCSI WRITE SAME command. More...
|
| |
| static void | ocs_scsi_ramd_free (ocs_t *ocs, ocs_ramdisc_t ***rdisc, uint32_t *rdisc_count) |
| | Free the memory associate with a ramdisc. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_common (ocs_io_t *io, uint64_t lba, uint32_t block_count, uint8_t rdprotect, uint32_t app_tag, uint32_t ref_tag) |
| | Common code used for all SCSI READ commands. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_common (ocs_io_t *io, uint64_t lba, uint32_t block_count, uint8_t wrprotect, uint32_t app_tag, uint32_t ref_tag) |
| | Common code for all SCSI WRITE commands. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_same_common (ocs_io_t *io, uint64_t lba, uint32_t block_count, uint8_t wrprotect, uint8_t pbdata, uint8_t lbdata, uint32_t app_tag, uint32_t ref_tag) |
| | Common code for all SCSI WRITE SAME commands. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_write_long_common (ocs_io_t *io, uint64_t lba, uint16_t xfer_len, uint8_t cor_dis, uint8_t wr_uncor, uint8_t pblock) |
| | Common code for all SCSI WRITE LONG commands. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_read_long_common (ocs_io_t *io, uint64_t lba, uint16_t xfer_len, uint8_t pblock, uint8_t corrct) |
| | Common code used for all SCSI READ commands. More...
|
| |
| static int32_t | ocs_ramd_io_error (ocs_io_t *io, ocs_scsi_io_status_e scsi_status) |
| |
| static int32_t | ocs_ramd_abort_tgt_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Command abort callback. More...
|
| |
| static int32_t | ocs_mgmt_read_block (ocs_t *ocs, char *, void *, uint32_t, void *, uint32_t) |
| |
| void | ocs_mgmt_ramd_list (ocs_textbuf_t *textbuf, void *object) |
| |
| void | ocs_mgmt_ramd_get_all (ocs_textbuf_t *textbuf, void *object) |
| |
| int | ocs_mgmt_ramd_get (ocs_textbuf_t *textbuf, char *parent, char *name, void *object) |
| |
| int | ocs_mgmt_ramd_exec (char *parent, char *action, void *arg_in, uint32_t arg_in_length, void *arg_out, uint32_t arg_out_length, void *object) |
| |
| static void | ocs_ignore_abort_evt (ocs_sm_event_t evt, const char *func, ocs_io_t *io, ocs_io_t *tmfio) |
| | Ignore abort event. More...
|
| |
| int32_t | ocs_scsi_tgt_driver_init (void) |
| | Driver-wide initialization for the target-server. More...
|
| |
| int32_t | ocs_scsi_tgt_driver_exit (void) |
| | Driver-wide clean-up for the target-server. More...
|
| |
| uint32_t | ocs_scsi_tgt_io_state (ocs_io_t *io) |
| | Set SCST IO state. More...
|
| |
| int32_t | ocs_scsi_tgt_io_init (ocs_io_t *io) |
| | Initialize SCSI IO. More...
|
| |
| int32_t | ocs_scsi_tgt_io_exit (ocs_io_t *io) |
| | Un-initialize SCSI IO. More...
|
| |
| ocs_ramdisc_t * | ocs_ramd_lookup (ocs_io_t *io, uint32_t lun) |
| | Given an IO and a LUN number, return the ramdisc to which the IO is directed. More...
|
| |
| ocs_ramdisc_t * | ocs_ramd_lookup_by_tgt (ocs_t *ocs, uint32_t tgt, uint32_t lun) |
| | Given an TGT number and a LUN number, return the corresponding ramdisc. More...
|
| |
| static int32_t | ocs_scsi_ramd_create (ocs_t *ocs, ocs_ramdisc_t ***rdisc, uint32_t *rdisc_count) |
| | Create a RAMD (target) based on the property parameter values. More...
|
| |
| int32_t | ocs_scsi_tgt_new_device (ocs_t *ocs) |
| | Initializes any target fields on the ocs structure. More...
|
| |
| int32_t | ocs_scsi_tgt_del_device (ocs_t *ocs) |
| | Tears down the target members of the ocs structure. More...
|
| |
| int32_t | ocs_scsi_tgt_new_domain (ocs_domain_t *domain) |
| | Accept a new domain notification. More...
|
| |
| void | ocs_scsi_tgt_del_domain (ocs_domain_t *domain) |
| | Accept a domain lost notification. More...
|
| |
| int32_t | ocs_scsi_tgt_new_sport (ocs_sport_t *sport) |
| | Accept a new SLI Port notification. More...
|
| |
| void | ocs_scsi_tgt_del_sport (ocs_sport_t *sport) |
| | Accept a SLI Port gone notification. More...
|
| |
| int32_t | ocs_scsi_validate_initiator (ocs_node_t *node) |
| | Validate a new initiator. More...
|
| |
| int32_t | ocs_scsi_new_initiator (ocs_node_t *node) |
| | Receive notification of a new SCSI initiator node. More...
|
| |
| int32_t | ocs_scsi_del_initiator (ocs_node_t *node, ocs_scsi_del_initiator_reason_e reason) |
| | Delete a SCSI initiator node. More...
|
| |
| static void | ocs_ramd_io_free (ocs_io_t *io) |
| | Perform ramd IO free. More...
|
| |
| int32_t | _ocs_scsi_recv_cmd (ocs_io_t *io, uint32_t lun, uint8_t *cdb, uint32_t cdb_len, uint32_t flags) |
| | Receive an FCP SCSI command. More...
|
| |
| int32_t | ocs_scsi_recv_cmd_first_burst (ocs_io_t *io, uint32_t lun, uint8_t *cdb, uint32_t cdb_len, uint32_t flags, ocs_dma_t first_burst_buffers[], uint32_t first_burst_bytes) |
| | Receive an FCP SCSI command with the first burst data. More...
|
| |
| int32_t | ocs_scsi_get_block_vaddr (ocs_io_t *io, uint64_t blocknumber, ocs_scsi_vaddr_len_t addrlen[], uint32_t max_addrlen, void **dif_vaddr) |
| | Return address of data and DIF data given a block in the target. More...
|
| |
| int32_t | ocs_scsi_recv_cmd_common (ocs_io_t *io, uint32_t lun, uint8_t *cdb, uint32_t cdb_len, uint32_t flags, uint8_t has_first_burst, ocs_dma_t first_burst_buffers[], uint32_t first_burst_bytes) |
| | Common code used by ocs_scsi_recv_cmd() and ocs_scsi_recv_cmd_first_burst(). More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_call_cmd_handler (ocs_io_t *io) |
| | Function to call the command handler for a CDB. More...
|
| |
| static int32_t | ocs_ramd_tgt_abort_rsp_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Abort response callback. More...
|
| |
| static void | ocs_ramd_abort_cleanup (ocs_io_t *io) |
| | State: Cleanup aborted IO. More...
|
| |
| ocs_ramd_hndlr_rtn_e | ocs_ramd_good_status (ocs_io_t *io) |
| | Send a good SCSI status. More...
|
| |
| ocs_ramd_hndlr_rtn_e | ocs_ramd_check_cond (ocs_io_t *io, uint8_t sense_key, uint8_t asc, uint8_t ascq) |
| | Send a SCSI check condition. More...
|
| |
| ocs_ramd_hndlr_rtn_e | ocs_ramd_task_set_full_or_busy (ocs_io_t *io) |
| | Send a SCSI task set full or busy status. More...
|
| |
| int32_t | ocs_scsi_recv_tmf (ocs_io_t *tmfio, uint32_t lun, ocs_scsi_tmf_cmd_e cmd, ocs_io_t *io_to_abort, uint32_t flags) |
| | Receive a TMF command IO. More...
|
| |
| int32_t | _scsi_io_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Response phase callback. More...
|
| |
| int32_t | _scsi_dataphase_cb (ocs_io_t *io, ocs_scsi_io_status_e scsi_status, uint32_t flags, void *arg) |
| | Command data phase callback. More...
|
| |
| static int32_t | ocs_ramd_first_burst_local (ocs_io_t *io, uint32_t bytes_left) |
| | Process first burst data into the IO DMA memory. More...
|
| |
| static int32_t | ocs_ramd_first_burst_no_dif (ocs_io_t *io, ocs_ramdisc_t *ramdisc) |
| | Process the first burst data without any DIF information. More...
|
| |
| static void | ocs_ramd_set_dif_prot_type_fields (ocs_t *ocs, ocs_ramdisc_t *ramdisc, ocs_scsi_dif_info_t *dif_info) |
| | Set the Disable App and reference fields based on the protection type. More...
|
| |
| static int32_t | ocs_ramd_first_burst_with_dif (ocs_io_t *io, ocs_ramdisc_t *ramdisc, uint32_t data_blk_size) |
| | Process the first burst data by adding/verifying/stripping DIF information. More...
|
| |
| static ocs_ramd_hndlr_rtn_e | ocs_ramd_init_write_dif (ocs_io_t *io, ocs_scsi_dif_info_t *dif_info, uint8_t wrprotect, uint32_t app_tag, uint32_t ref_tag) |
| |
| void | ocs_scsi_tgt_ddump (ocs_textbuf_t *textbuf, ocs_scsi_ddump_type_e type, void *obj) |
| |
| static void | post_one_ua (ocs_node_t *node, uint32_t lun, uint8_t asc, uint8_t ascq) |
| | Post a Unit Attention condition to a node/LUN (I_T nexus). More...
|
| |
| void | ocs_ramd_post_ua (ocs_t *ocs, ocs_ramdisc_t *ramdisc, uint8_t asc, uint8_t ascq, ocs_node_t *except_node) |
| | Post a Unit Attention condition to a ramdisc. More...
|
| |
| int32_t | ocs_ramd_get_ua (ocs_t *ocs, ocs_node_t *node, uint32_t lun, uint8_t *asc, uint8_t *ascq) |
| | Get a pending Unit Attention, if any. More...
|
| |
| void | ocs_ramd_clear_ua (ocs_t *ocs, ocs_node_t *node, uint32_t lun, uint8_t asc, uint8_t ascq) |
| | Clear a Unit Attention condition. More...
|
| |
| int32_t | ocs_port_rdisc_init (ocs_t *ocs) |
| | Initialize per port ramdisc structure. More...
|
| |
| void | ocs_port_rdisc_free (ocs_t *ocs) |
| | Free per port ramdisc structure. More...
|
| |
| int32_t | ocs_port_rdisc_find (ocs_t *ocs, uint32_t tgt_id, ocs_ramdisc_t ***rdisc, uint32_t *rdisc_count) |
| | Find a per port ramdisc instance. More...
|
| |
| int32_t | ocs_port_rdisc_save (ocs_t *ocs, uint32_t tgt_id, ocs_ramdisc_t **rdisc, uint32_t rdisc_count) |
| | Save a per port ramdisc. More...
|
| |