FreeBSD kernel CAM code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/ctype.h>
#include <sys/kernel.h>
#include <sys/types.h>
#include <sys/kthread.h>
#include <sys/bio.h>
#include <sys/fcntl.h>
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/condvar.h>
#include <sys/malloc.h>
#include <sys/conf.h>
#include <sys/ioccom.h>
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/smp.h>
#include <sys/endian.h>
#include <sys/proc.h>
#include <sys/sched.h>
#include <sys/sysctl.h>
#include <sys/nv.h>
#include <sys/dnv.h>
#include <vm/uma.h>
#include <cam/cam.h>
#include <cam/scsi/scsi_all.h>
#include <cam/scsi/scsi_cd.h>
#include <cam/scsi/scsi_da.h>
#include <cam/ctl/ctl_io.h>
#include <cam/ctl/ctl.h>
#include <cam/ctl/ctl_frontend.h>
#include <cam/ctl/ctl_util.h>
#include <cam/ctl/ctl_backend.h>
#include <cam/ctl/ctl_ioctl.h>
#include <cam/ctl/ctl_ha.h>
#include <cam/ctl/ctl_private.h>
#include <cam/ctl/ctl_debug.h>
#include <cam/ctl/ctl_scsi_all.h>
#include <cam/ctl/ctl_error.h>
#include "ctl_ser_table.c"
Go to the source code of this file.
Macros | |
#define | CTL_CEM_LEN (sizeof(struct scsi_control_ext_page) - 4) |
#define | CTL_LBPM_LEN (sizeof(struct ctl_logical_block_provisioning_page) - 4) |
#define | CTL_DEFAULT_MAX_LUNS 1024 |
#define | CTL_DEFAULT_MAX_PORTS 256 |
#define | CTL_MAX_INITIATORS (CTL_MAX_INIT_PER_PORT * ctl_max_ports) |
#define | SCSI_EVPD_NUM_SUPPORTED_PAGES 11 |
Functions | |
__FBSDID ("$FreeBSD$") | |
SYSCTL_NODE (_kern_cam, OID_AUTO, ctl, CTLFLAG_RD|CTLFLAG_MPSAFE, 0, "CAM Target Layer") | |
SYSCTL_INT (_kern_cam_ctl, OID_AUTO, worker_threads, CTLFLAG_RDTUN, &worker_threads, 1, "Number of worker threads") | |
SYSCTL_INT (_kern_cam_ctl, OID_AUTO, debug, CTLFLAG_RWTUN, &ctl_debug, 0, "Enabled debug flags") | |
SYSCTL_INT (_kern_cam_ctl, OID_AUTO, lun_map_size, CTLFLAG_RWTUN, &ctl_lun_map_size, 0, "Size of per-port LUN map (max LUN + 1)") | |
TUNABLE_INT ("kern.cam.ctl.max_luns", &ctl_max_luns) | |
SYSCTL_INT (_kern_cam_ctl, OID_AUTO, max_luns, CTLFLAG_RDTUN, &ctl_max_luns, CTL_DEFAULT_MAX_LUNS, "Maximum number of LUNs") | |
TUNABLE_INT ("kern.cam.ctl.max_ports", &ctl_max_ports) | |
SYSCTL_INT (_kern_cam_ctl, OID_AUTO, max_ports, CTLFLAG_RDTUN, &ctl_max_ports, CTL_DEFAULT_MAX_LUNS, "Maximum number of ports") | |
static void | ctl_isc_event_handler (ctl_ha_channel chanel, ctl_ha_event event, int param) |
static void | ctl_copy_sense_data (union ctl_ha_msg *src, union ctl_io *dest) |
static void | ctl_copy_sense_data_back (union ctl_io *src, union ctl_ha_msg *dest) |
static int | ctl_init (void) |
static int | ctl_shutdown (void) |
static int | ctl_open (struct cdev *dev, int flags, int fmt, struct thread *td) |
static int | ctl_close (struct cdev *dev, int flags, int fmt, struct thread *td) |
static void | ctl_serialize_other_sc_cmd (struct ctl_scsiio *ctsio) |
static void | ctl_ioctl_fill_ooa (struct ctl_lun *lun, uint32_t *cur_fill_num, struct ctl_ooa *ooa_hdr, struct ctl_ooa_entry *kern_entries) |
static int | ctl_ioctl (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) |
static int | ctl_enable_lun (struct ctl_lun *lun) |
static int | ctl_disable_lun (struct ctl_lun *lun) |
static int | ctl_free_lun (struct ctl_lun *lun) |
static int | ctl_do_mode_select (union ctl_io *io) |
static int | ctl_pro_preempt (struct ctl_softc *softc, struct ctl_lun *lun, uint64_t res_key, uint64_t sa_res_key, uint8_t type, uint32_t residx, struct ctl_scsiio *ctsio, struct scsi_per_res_out *cdb, struct scsi_per_res_out_parms *param) |
static void | ctl_pro_preempt_other (struct ctl_lun *lun, union ctl_ha_msg *msg) |
static void | ctl_hndl_per_res_out_on_other_sc (union ctl_io *io) |
static int | ctl_inquiry_evpd_supported (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_serial (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_devid (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_eid (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_mpp (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_scsi_ports (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_sfs (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_block_limits (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_bdc (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd_lbp (struct ctl_scsiio *ctsio, int alloc_len) |
static int | ctl_inquiry_evpd (struct ctl_scsiio *ctsio) |
static int | ctl_inquiry_std (struct ctl_scsiio *ctsio) |
static int | ctl_get_lba_len (union ctl_io *io, uint64_t *lba, uint64_t *len) |
static ctl_action | ctl_extent_check (union ctl_io *io1, union ctl_io *io2, bool seq) |
static ctl_action | ctl_seq_check (union ctl_io *io1, union ctl_io *io2) |
static ctl_action | ctl_check_for_blockage (struct ctl_lun *lun, union ctl_io *pending_io, const uint8_t *serialize_row, union ctl_io *ooa_io) |
static ctl_action | ctl_check_ooa (struct ctl_lun *lun, union ctl_io *pending_io, union ctl_io **starting_io) |
static void | ctl_try_unblock_io (struct ctl_lun *lun, union ctl_io *io, bool skip) |
static void | ctl_try_unblock_others (struct ctl_lun *lun, union ctl_io *io, bool skip) |
static int | ctl_scsiio_lun_check (struct ctl_lun *lun, const struct ctl_cmd_entry *entry, struct ctl_scsiio *ctsio) |
static void | ctl_failover_lun (union ctl_io *io) |
static void | ctl_scsiio_precheck (struct ctl_scsiio *ctsio) |
static int | ctl_scsiio (struct ctl_scsiio *ctsio) |
static int | ctl_target_reset (union ctl_io *io) |
static void | ctl_do_lun_reset (struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua_type) |
static int | ctl_lun_reset (union ctl_io *io) |
static int | ctl_abort_task (union ctl_io *io) |
static int | ctl_abort_task_set (union ctl_io *io) |
static int | ctl_query_task (union ctl_io *io, int task_set) |
static void | ctl_i_t_nexus_loss (struct ctl_softc *softc, uint32_t initidx, ctl_ua_type ua_type) |
static int | ctl_i_t_nexus_reset (union ctl_io *io) |
static int | ctl_query_async_event (union ctl_io *io) |
static void | ctl_run_task (union ctl_io *io) |
static void | ctl_send_datamove_done (union ctl_io *io, int have_lock) |
static void | ctl_datamove_remote_write_cb (struct ctl_ha_dt_req *rq) |
static int | ctl_datamove_remote_dm_write_cb (union ctl_io *io, bool samethr) |
static void | ctl_datamove_remote_write (union ctl_io *io) |
static int | ctl_datamove_remote_dm_read_cb (union ctl_io *io, bool samethr) |
static void | ctl_datamove_remote_read_cb (struct ctl_ha_dt_req *rq) |
static int | ctl_datamove_remote_sgl_setup (union ctl_io *io) |
static int | ctl_datamove_remote_xfer (union ctl_io *io, unsigned command, ctl_ha_dt_cb callback) |
static void | ctl_datamove_remote_read (union ctl_io *io) |
static void | ctl_datamove_remote (union ctl_io *io) |
static void | ctl_process_done (union ctl_io *io) |
static void | ctl_thresh_thread (void *arg) |
static void | ctl_work_thread (void *arg) |
static void | ctl_enqueue_incoming (union ctl_io *io) |
static void | ctl_enqueue_rtr (union ctl_io *io) |
static void | ctl_enqueue_done (union ctl_io *io) |
static void | ctl_enqueue_isc (union ctl_io *io) |
static const struct ctl_cmd_entry * | ctl_get_cmd_entry (struct ctl_scsiio *ctsio, int *sa) |
static const struct ctl_cmd_entry * | ctl_validate_command (struct ctl_scsiio *ctsio) |
static int | ctl_cmd_applicable (uint8_t lun_type, const struct ctl_cmd_entry *entry) |
static int | ctl_ha_init (void) |
static int | ctl_ha_shutdown (void) |
static uint64_t | ctl_get_prkey (struct ctl_lun *lun, uint32_t residx) |
static void | ctl_clr_prkey (struct ctl_lun *lun, uint32_t residx) |
static void | ctl_alloc_prkey (struct ctl_lun *lun, uint32_t residx) |
static void | ctl_set_prkey (struct ctl_lun *lun, uint32_t residx, uint64_t key) |
MALLOC_DEFINE (M_CTL, "ctlmem", "Memory used for CTL") | |
static int | ctl_module_event_handler (module_t, int, void *) |
DECLARE_MODULE (ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD) | |
MODULE_VERSION (ctl, 1) | |
static void | ctl_ha_datamove (union ctl_io *io) |
static void | ctl_ha_done (union ctl_io *io) |
static void | ctl_isc_handler_finish_xfer (struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) |
static void | ctl_isc_handler_finish_ser_only (struct ctl_softc *ctl_softc, union ctl_ha_msg *msg_info) |
void | ctl_isc_announce_lun (struct ctl_lun *lun) |
void | ctl_isc_announce_port (struct ctl_port *port) |
void | ctl_isc_announce_iid (struct ctl_port *port, int iid) |
void | ctl_isc_announce_mode (struct ctl_lun *lun, uint32_t initidx, uint8_t page, uint8_t subpage) |
static void | ctl_isc_ha_link_up (struct ctl_softc *softc) |
static void | ctl_isc_ha_link_down (struct ctl_softc *softc) |
static void | ctl_isc_ua (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
static void | ctl_isc_lun_sync (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
static void | ctl_isc_port_sync (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
static void | ctl_isc_iid_sync (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
static void | ctl_isc_login (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
static void | ctl_isc_mode_sync (struct ctl_softc *softc, union ctl_ha_msg *msg, int len) |
void | ctl_est_ua (struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) |
void | ctl_est_ua_port (struct ctl_lun *lun, int port, uint32_t except, ctl_ua_type ua) |
void | ctl_est_ua_all (struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) |
void | ctl_clr_ua (struct ctl_lun *lun, uint32_t initidx, ctl_ua_type ua) |
void | ctl_clr_ua_all (struct ctl_lun *lun, uint32_t except, ctl_ua_type ua) |
void | ctl_clr_ua_allluns (struct ctl_softc *ctl_softc, uint32_t initidx, ctl_ua_type ua_type) |
static int | ctl_ha_role_sysctl (SYSCTL_HANDLER_ARGS) |
int | ctl_remove_initiator (struct ctl_port *port, int iid) |
int | ctl_add_initiator (struct ctl_port *port, int iid, uint64_t wwpn, char *name) |
static int | ctl_create_iid (struct ctl_port *port, int iid, uint8_t *buf) |
int | ctl_sbuf_printf_esc (struct sbuf *sb, char *str, int size) |
static void | ctl_id_sbuf (struct ctl_devid *id, struct sbuf *sb) |
uint32_t | ctl_get_initindex (struct ctl_nexus *nexus) |
int | ctl_lun_map_init (struct ctl_port *port) |
int | ctl_lun_map_deinit (struct ctl_port *port) |
int | ctl_lun_map_set (struct ctl_port *port, uint32_t plun, uint32_t glun) |
int | ctl_lun_map_unset (struct ctl_port *port, uint32_t plun) |
uint32_t | ctl_lun_map_from_port (struct ctl_port *port, uint32_t lun_id) |
uint32_t | ctl_lun_map_to_port (struct ctl_port *port, uint32_t lun_id) |
uint32_t | ctl_decode_lun (uint64_t encoded) |
uint64_t | ctl_encode_lun (uint32_t decoded) |
int | ctl_ffz (uint32_t *mask, uint32_t first, uint32_t last) |
int | ctl_set_mask (uint32_t *mask, uint32_t bit) |
int | ctl_clear_mask (uint32_t *mask, uint32_t bit) |
int | ctl_is_set (uint32_t *mask, uint32_t bit) |
int | ctl_pool_create (struct ctl_softc *ctl_softc, const char *pool_name, uint32_t total_ctl_io, void **npool) |
void | ctl_pool_free (struct ctl_io_pool *pool) |
union ctl_io * | ctl_alloc_io (void *pool_ref) |
union ctl_io * | ctl_alloc_io_nowait (void *pool_ref) |
void | ctl_free_io (union ctl_io *io) |
void | ctl_zero_io (union ctl_io *io) |
int | ctl_expand_number (const char *buf, uint64_t *num) |
static int | ctl_init_page_index (struct ctl_lun *lun) |
static int | ctl_init_log_page_index (struct ctl_lun *lun) |
static int | hex2bin (const char *str, uint8_t *buf, int buf_size) |
int | ctl_add_lun (struct ctl_be_lun *be_lun) |
int | ctl_start_lun (struct ctl_be_lun *be_lun) |
int | ctl_stop_lun (struct ctl_be_lun *be_lun) |
int | ctl_lun_no_media (struct ctl_be_lun *be_lun) |
int | ctl_lun_has_media (struct ctl_be_lun *be_lun) |
int | ctl_lun_ejected (struct ctl_be_lun *be_lun) |
int | ctl_lun_primary (struct ctl_be_lun *be_lun) |
int | ctl_lun_secondary (struct ctl_be_lun *be_lun) |
int | ctl_remove_lun (struct ctl_be_lun *be_lun) |
void | ctl_lun_capacity_changed (struct ctl_be_lun *be_lun) |
int | ctl_config_move_done (union ctl_io *io, bool samethr) |
void | ctl_data_submit_done (union ctl_io *io) |
void | ctl_config_write_done (union ctl_io *io) |
void | ctl_config_read_done (union ctl_io *io) |
int | ctl_scsi_release (struct ctl_scsiio *ctsio) |
int | ctl_scsi_reserve (struct ctl_scsiio *ctsio) |
int | ctl_start_stop (struct ctl_scsiio *ctsio) |
int | ctl_prevent_allow (struct ctl_scsiio *ctsio) |
int | ctl_sync_cache (struct ctl_scsiio *ctsio) |
int | ctl_format (struct ctl_scsiio *ctsio) |
int | ctl_read_buffer (struct ctl_scsiio *ctsio) |
int | ctl_write_buffer (struct ctl_scsiio *ctsio) |
static int | ctl_write_same_cont (union ctl_io *io) |
int | ctl_write_same (struct ctl_scsiio *ctsio) |
int | ctl_unmap (struct ctl_scsiio *ctsio) |
int | ctl_default_page_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) |
static void | ctl_ie_timer (void *arg) |
int | ctl_ie_page_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) |
int | ctl_mode_select (struct ctl_scsiio *ctsio) |
int | ctl_mode_sense (struct ctl_scsiio *ctsio) |
int | ctl_temp_log_sense_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc) |
int | ctl_lbp_log_sense_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc) |
int | ctl_sap_log_sense_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc) |
int | ctl_ie_log_sense_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc) |
int | ctl_log_sense (struct ctl_scsiio *ctsio) |
int | ctl_read_capacity (struct ctl_scsiio *ctsio) |
int | ctl_read_capacity_16 (struct ctl_scsiio *ctsio) |
int | ctl_get_lba_status (struct ctl_scsiio *ctsio) |
int | ctl_read_defect (struct ctl_scsiio *ctsio) |
int | ctl_report_ident_info (struct ctl_scsiio *ctsio) |
int | ctl_report_tagret_port_groups (struct ctl_scsiio *ctsio) |
int | ctl_report_supported_opcodes (struct ctl_scsiio *ctsio) |
int | ctl_report_supported_tmf (struct ctl_scsiio *ctsio) |
int | ctl_report_timestamp (struct ctl_scsiio *ctsio) |
int | ctl_persistent_reserve_in (struct ctl_scsiio *ctsio) |
int | ctl_persistent_reserve_out (struct ctl_scsiio *ctsio) |
int | ctl_read_write (struct ctl_scsiio *ctsio) |
static int | ctl_cnw_cont (union ctl_io *io) |
int | ctl_cnw (struct ctl_scsiio *ctsio) |
int | ctl_verify (struct ctl_scsiio *ctsio) |
int | ctl_report_luns (struct ctl_scsiio *ctsio) |
int | ctl_request_sense (struct ctl_scsiio *ctsio) |
int | ctl_tur (struct ctl_scsiio *ctsio) |
int | ctl_inquiry (struct ctl_scsiio *ctsio) |
int | ctl_get_config (struct ctl_scsiio *ctsio) |
int | ctl_get_event_status (struct ctl_scsiio *ctsio) |
int | ctl_mechanism_status (struct ctl_scsiio *ctsio) |
static void | ctl_ultomsf (uint32_t lba, uint8_t *buf) |
int | ctl_read_toc (struct ctl_scsiio *ctsio) |
static ctl_action | ctl_extent_check_lba (uint64_t lba1, uint64_t len1, uint64_t lba2, uint64_t len2, bool seq) |
static int | ctl_extent_check_unmap (union ctl_io *io, uint64_t lba2, uint64_t len2) |
static void | ctl_failover_io (union ctl_io *io, int have_lock) |
static void | ctl_abort_tasks_lun (struct ctl_lun *lun, uint32_t targ_port, uint32_t init_id, int other_sc) |
static void | ctl_handle_isc (union ctl_io *io) |
static ctl_lun_error_pattern | ctl_cmd_pattern_match (struct ctl_scsiio *ctsio, struct ctl_error_desc *desc) |
static void | ctl_inject_error (struct ctl_lun *lun, union ctl_io *io) |
static void | ctl_datamove_done_process (union ctl_io *io) |
void | ctl_datamove_done (union ctl_io *io, bool samethr) |
void | ctl_datamove (union ctl_io *io) |
int | ctl_queue_sense (union ctl_io *io) |
int | ctl_queue (union ctl_io *io) |
int | ctl_run (union ctl_io *io) |
void | ctl_serseq_done (union ctl_io *io) |
void | ctl_done (union ctl_io *io) |
#define CTL_CEM_LEN (sizeof(struct scsi_control_ext_page) - 4) |
#define CTL_LBPM_LEN (sizeof(struct ctl_logical_block_provisioning_page) - 4) |
#define CTL_MAX_INITIATORS (CTL_MAX_INIT_PER_PORT * ctl_max_ports) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 12076 of file ctl.c.
References CTL_FLAG_ABORT, CTL_FLAG_FROM_OTHER_SC, CTL_HA_CHAN_CTL, ctl_ha_msg_send(), ctl_softc::ctl_lock, CTL_LUN_PRIMARY_SC, ctl_softc::ctl_luns, ctl_max_luns, CTL_MSG_MANAGE_TASKS, CTL_SOFTC, CTL_TAG_UNTAGGED, CTL_TASK_ABORT_TASK, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_LUN_DOES_NOT_EXIST, ctl_try_unblock_io(), ctl_io_hdr::flags, ctl_lun::flags, ctl_ha_msg::hdr, ctl_nexus::initid, ctl_io::io_hdr, ctl_ha_msg::lun, ctl_lun::lun, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_io::scsiio, ctl_ha_msg_hdr::serializing_sc, ctl_scsiio::tag_num, ctl_taskio::tag_num, ctl_ha_msg_task::tag_num, ctl_scsiio::tag_type, ctl_taskio::tag_type, ctl_ha_msg_task::tag_type, ctl_nexus::targ_mapped_lun, ctl_nexus::targ_port, ctl_ha_msg::task, ctl_ha_msg_task::task_action, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
|
static |
Definition at line 11982 of file ctl.c.
References ctl_abort_tasks_lun(), CTL_FLAG_FROM_OTHER_SC, ctl_softc::ctl_lock, ctl_softc::ctl_luns, ctl_max_luns, CTL_SOFTC, CTL_TASK_ABORT_TASK_SET, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_LUN_DOES_NOT_EXIST, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_lun::lun, ctl_io_hdr::nexus, ctl_nexus::targ_mapped_lun, ctl_nexus::targ_port, ctl_taskio::task_action, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
|
static |
Definition at line 11939 of file ctl.c.
References CTL_FLAG_ABORT, CTL_FLAG_ABORT_STATUS, CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_LUN_PRIMARY_SC, CTL_MSG_MANAGE_TASKS, CTL_TASK_ABORT_TASK, ctl_try_unblock_io(), ctl_io_hdr::flags, ctl_lun::flags, ctl_ha_msg::hdr, ctl_nexus::initid, ctl_ha_msg::lun, ctl_lun::lun_lock, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_io::scsiio, ctl_ha_msg_hdr::serializing_sc, ctl_scsiio::tag_num, ctl_ha_msg_task::tag_num, ctl_scsiio::tag_type, ctl_ha_msg_task::tag_type, ctl_nexus::targ_port, ctl_ha_msg::task, and ctl_ha_msg_task::task_action.
Referenced by ctl_abort_task_set(), and ctl_i_t_nexus_loss().
int ctl_add_initiator | ( | struct ctl_port * | port, |
int | iid, | ||
uint64_t | wwpn, | ||
char * | name | ||
) |
Definition at line 2174 of file ctl.c.
References ctl_isc_announce_iid(), ctl_softc::ctl_lock, CTL_MAX_INIT_PER_PORT, ctl_port::ctl_softc, ctl_wwpn_iid::in_use, ctl_wwpn_iid::last_use, ctl_wwpn_iid::name, ctl_port::targ_port, ctl_wwpn_iid::wwpn, and ctl_port::wwpn_iid.
Referenced by cfiscsi_session_register_initiator(), and ctlfeasync().
int ctl_add_lun | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 4571 of file ctl.c.
References ctl_lun::backend, ctl_be_lun::be, ctl_lun::be_lun, control_softc, ctl_clear_mask(), CTL_DEVID_LEN, CTL_DEVID_MIN_LEN, ctl_enable_lun(), ctl_est_ua_all(), ctl_ffz(), ctl_init_log_page_index(), ctl_init_page_index(), ctl_is_set(), ctl_softc::ctl_lock, ctl_be_lun::ctl_lun, CTL_LUN_DISABLED, CTL_LUN_EJECTED, CTL_LUN_FLAG_EJECTED, CTL_LUN_FLAG_ID_REQ, CTL_LUN_FLAG_NO_MEDIA, CTL_LUN_FLAG_PRIMARY, CTL_LUN_FLAG_STOPPED, ctl_softc::ctl_lun_mask, CTL_LUN_NO_MEDIA, CTL_LUN_PRIMARY_SC, CTL_LUN_REMOVABLE, CTL_LUN_STOPPED, ctl_softc::ctl_luns, CTL_MAX_INITIATORS, ctl_max_luns, ctl_max_ports, ctl_set_mask(), ctl_lun::ctl_softc, ctl_tpc_lun_init(), CTL_UA_LUN_CHANGE, CTL_VENDOR, ctl_devid::data, ctl_be_lun::device_id, ctl_be_lun::flags, ctl_lun::flags, hex2bin(), scsi_vpd_id_descriptor::id_type, scsi_vpd_id_descriptor::identifier, ctl_lun::ie_callout, ctl_lun::ie_reported, ctl_io_stats::item, ctl_devid::len, scsi_vpd_id_descriptor::length, ctl_lun::lun, ctl_lun::lun_devid, ctl_be_lun::lun_id, ctl_lun::lun_lock, ctl_be_lun::lun_type, ctl_softc::num_luns, ctl_be_lun::options, ctl_lun::pending_sense, ctl_lun::pending_ua, ctl_lun::pr_keys, ctl_lun::prevent, scsi_vpd_id_descriptor::proto_codeset, ctl_be_lun::req_lun_id, ctl_lun::stats, SVPD_ID_ASSOC_LUN, SVPD_ID_CODESET_ASCII, SVPD_ID_CODESET_BINARY, SVPD_ID_CODESET_UTF8, SVPD_ID_PIV, SVPD_ID_TYPE_EUI64, SVPD_ID_TYPE_NAA, SVPD_ID_TYPE_SCSI_NAME, SVPD_ID_TYPE_T10, SVPD_ID_TYPE_UUID, T_CDROM, T_CHANGER, T_DIRECT, T_PROCESSOR, T_SEQUENTIAL, scsi_vpd_id_t10::vendor, and scsi_vpd_id_t10::vendor_spec_id.
Referenced by ctl_backend_ramdisk_create(), and ctl_be_block_create().
union ctl_io * ctl_alloc_io | ( | void * | pool_ref | ) |
Definition at line 3961 of file ctl.c.
References CTL_SOFTC, ctl_io_pool::ctl_softc, ctl_io::io_hdr, ctl_io_hdr::pool, and ctl_io_pool::zone.
Referenced by cfiscsi_pdu_handle_scsi_command(), cfiscsi_pdu_handle_task_request(), cfiscsi_session_terminate_tasks(), ctl_ioctl_io(), ctl_isc_event_handler(), ctl_isc_ha_link_down(), and tpcl_alloc_io().
union ctl_io * ctl_alloc_io_nowait | ( | void * | pool_ref | ) |
Definition at line 3976 of file ctl.c.
References CTL_SOFTC, ctl_io_pool::ctl_softc, ctl_io::io_hdr, ctl_io_hdr::pool, and ctl_io_pool::zone.
Referenced by cfcs_action(), ctlfedone(), and ctlferegister().
|
static |
Definition at line 3890 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, and ctl_lun::lun.
Referenced by ctl_hndl_per_res_out_on_other_sc(), ctl_isc_lun_sync(), and ctl_persistent_reserve_out().
|
static |
Definition at line 10993 of file ctl.c.
References ctl_lun::be_lun, CTL_ACTION_BLOCK, CTL_ACTION_OVERLAP, CTL_ACTION_OVERLAP_TAG, CTL_ACTION_PASS, ctl_extent_check(), CTL_FLAG_ABORT, CTL_FLAG_STATUS_SENT, CTL_LUN_SERSEQ_OFF, CTL_LUN_SERSEQ_ON, ctl_seq_check(), CTL_SER_BLOCK, CTL_SER_BLOCKOPT, CTL_SER_EXTENT, CTL_SER_EXTENTOPT, CTL_SER_PASS, CTL_SER_SEQ, CTL_SERIDX_INVLD, CTL_TAG_HEAD_OF_QUEUE, CTL_TAG_ORDERED, CTL_TAG_UNTAGGED, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_io_hdr::nexus, SCP_QUEUE_ALG_MASK, SCP_QUEUE_ALG_UNRESTRICTED, ctl_io::scsiio, ctl_scsiio::seridx, ctl_be_lun::serseq, ctl_scsiio::tag_num, ctl_scsiio::tag_type, and ctl_nexus::targ_port.
Referenced by ctl_check_ooa().
|
static |
Definition at line 11097 of file ctl.c.
References CTL_ACTION_BLOCK, CTL_ACTION_PASS, CTL_ACTION_SKIP, ctl_check_for_blockage(), CTL_FLAG_ABORT, ctl_serialize_table, CTL_TAG_ORDERED, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_lun::lun_lock, ctl_io::scsiio, ctl_scsiio::seridx, and ctl_scsiio::tag_type.
Referenced by ctl_scsiio_precheck(), ctl_serialize_other_sc_cmd(), and ctl_try_unblock_io().
int ctl_clear_mask | ( | uint32_t * | mask, |
uint32_t | bit | ||
) |
Definition at line 3838 of file ctl.c.
Referenced by ctl_add_lun(), ctl_do_lun_reset(), ctl_free_lun(), ctl_i_t_nexus_loss(), ctl_port_deregister(), ctl_port_register(), and ctl_prevent_allow().
|
static |
|
static |
Definition at line 3879 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, and ctl_lun::lun.
Referenced by ctl_hndl_per_res_out_on_other_sc(), ctl_isc_lun_sync(), ctl_persistent_reserve_out(), ctl_pro_preempt(), and ctl_pro_preempt_other().
void ctl_clr_ua | ( | struct ctl_lun * | lun, |
uint32_t | initidx, | ||
ctl_ua_type | ua | ||
) |
Definition at line 1848 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, ctl_lun::ctl_softc, ctl_softc::init_max, ctl_softc::init_min, ctl_lun::lun_lock, and ctl_lun::pending_ua.
Referenced by ctl_clr_ua_allluns(), ctl_isc_ua(), and ctl_report_luns().
void ctl_clr_ua_all | ( | struct ctl_lun * | lun, |
uint32_t | except, | ||
ctl_ua_type | ua | ||
) |
Definition at line 1863 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, ctl_lun::ctl_softc, ctl_lun::lun_lock, ctl_lun::pending_ua, ctl_softc::port_max, and ctl_softc::port_min.
Referenced by ctl_build_ua(), ctl_ie_page_handler(), ctl_isc_ua(), and ctl_thresh_thread().
void ctl_clr_ua_allluns | ( | struct ctl_softc * | ctl_softc, |
uint32_t | initidx, | ||
ctl_ua_type | ua_type | ||
) |
Definition at line 1881 of file ctl.c.
References ctl_clr_ua(), ctl_softc::ctl_lock, and ctl_lun::lun.
Referenced by ctl_build_ua().
|
static |
Definition at line 11756 of file ctl.c.
References CTL_CMD_FLAG_OK_ON_CDROM, CTL_CMD_FLAG_OK_ON_DIRECT, CTL_CMD_FLAG_OK_ON_PROC, ctl_cmd_entry::flags, T_CDROM, T_DIRECT, and T_PROCESSOR.
Referenced by ctl_report_supported_opcodes(), and ctl_scsiio_precheck().
|
static |
Definition at line 12359 of file ctl.c.
References CTL_ACTION_PASS, ctl_extent_check_lba(), ctl_get_cmd_entry(), ctl_get_lba_len(), CTL_LUN_PAT_ANY, CTL_LUN_PAT_CMD, CTL_LUN_PAT_MASK, CTL_LUN_PAT_NONE, CTL_LUN_PAT_RANGE, ctl_error_desc::error_pattern, ctl_lba_len::lba, ctl_error_desc::lba_range, ctl_lba_len::len, and ctl_cmd_entry::pattern.
Referenced by ctl_inject_error().
int ctl_cnw | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 8968 of file ctl.c.
References scsi_compare_and_write::addr, ctl_lun::backend, ctl_lun::be_lun, ctl_be_lun::blocksize, scsi_compare_and_write::byte2, ctl_scsiio::cdb, COMPARE_AND_WRITE, ctl_cnw_cont(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_IO_CONT, CTL_LLF_COMPARE, CTL_LLF_DPO, CTL_LLF_FUA, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_opcode(), ctl_set_lba_out_of_range(), ctl_set_success(), ctl_backend_driver::data_submit, ctl_lba_len_flags::flags, ctl_io_hdr::flags, ctl_scsiio::io_cont, ctl_scsiio::io_hdr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_total_len, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, scsi_compare_and_write::length, ctl_lun::lun, ctl_be_lun::maxlba, SCP_WCE, scsi_8btou64(), SRW10_DPO, and SRW10_FUA.
|
static |
Definition at line 8947 of file ctl.c.
References ctl_lun::backend, CTL_DEBUG_PRINT, CTL_LLF_COMPARE, CTL_LLF_WRITE, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_STATUS_NONE, ctl_backend_driver::data_submit, ctl_lba_len_flags::flags, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_lun::lun, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_cnw().
int ctl_config_move_done | ( | union ctl_io * | io, |
bool | samethr | ||
) |
Definition at line 5102 of file ctl.c.
References ctl_data_print(), ctl_debug, CTL_DEBUG_CDB_DATA, CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ABORT, CTL_FLAG_ALLOCATED, CTL_FLAG_DATA_IN, CTL_FLAG_DATA_MASK, CTL_IO_SCSI, CTL_RETVAL_COMPLETE, ctl_scsiio(), CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_scsiio::kern_data_ptr, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_backend_register(), ctl_extended_copy_lid1(), ctl_extended_copy_lid4(), ctl_format(), ctl_get_config(), ctl_get_event_status(), ctl_get_lba_status(), ctl_inquiry_evpd_bdc(), ctl_inquiry_evpd_block_limits(), ctl_inquiry_evpd_devid(), ctl_inquiry_evpd_eid(), ctl_inquiry_evpd_lbp(), ctl_inquiry_evpd_mpp(), ctl_inquiry_evpd_scsi_ports(), ctl_inquiry_evpd_serial(), ctl_inquiry_evpd_sfs(), ctl_inquiry_evpd_supported(), ctl_inquiry_evpd_tpc(), ctl_inquiry_std(), ctl_log_sense(), ctl_mechanism_status(), ctl_mode_select(), ctl_mode_sense(), ctl_persistent_reserve_in(), ctl_persistent_reserve_out(), ctl_populate_token(), ctl_read_buffer(), ctl_read_capacity(), ctl_read_capacity_16(), ctl_read_defect(), ctl_read_toc(), ctl_receive_copy_failure_details(), ctl_receive_copy_operating_parameters(), ctl_receive_copy_status_lid1(), ctl_receive_copy_status_lid4(), ctl_receive_rod_token_information(), ctl_report_all_rod_tokens(), ctl_report_ident_info(), ctl_report_luns(), ctl_report_supported_opcodes(), ctl_report_supported_tmf(), ctl_report_tagret_port_groups(), ctl_report_timestamp(), ctl_request_sense(), ctl_unmap(), ctl_write_buffer(), ctl_write_same(), and ctl_write_using_token().
void ctl_config_read_done | ( | union ctl_io * | io | ) |
Definition at line 5212 of file ctl.c.
References ctl_datamove(), ctl_done(), CTL_FLAG_ABORT, CTL_FLAG_ALLOCATED, CTL_FLAG_IO_CONT, CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::flags, ctl_scsiio::io_cont, ctl_io::io_hdr, ctl_scsiio::kern_data_ptr, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_backend_ramdisk_config_read(), ctl_backend_ramdisk_gls(), ctl_be_block_config_read(), ctl_be_block_cr_done(), and ctl_be_block_worker().
void ctl_config_write_done | ( | union ctl_io * | io | ) |
Definition at line 5178 of file ctl.c.
References ctl_done(), CTL_FLAG_ABORT, CTL_FLAG_ALLOCATED, CTL_FLAG_IO_CONT, CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::flags, ctl_scsiio::io_cont, ctl_io::io_hdr, ctl_scsiio::kern_data_ptr, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_backend_ramdisk_config_write(), ctl_backend_ramdisk_unmap(), ctl_backend_ramdisk_ws(), ctl_be_block_config_write(), ctl_be_block_cw_dispatch_unmap(), ctl_be_block_cw_dispatch_ws(), ctl_be_block_cw_done(), ctl_be_block_cw_done_ws(), and ctl_be_block_worker().
|
static |
Definition at line 1785 of file ctl.c.
References ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_io_hdr::status, and ctl_ha_msg_hdr::status.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1796 of file ctl.c.
References ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_io_hdr::status, and ctl_ha_msg_hdr::status.
Referenced by ctl_serialize_other_sc_cmd(), and ctl_try_unblock_io().
|
static |
Definition at line 2281 of file ctl.c.
References scsi_transportid_iscsi_port::additional_length, CTL_PORT_FC, CTL_PORT_ISCSI, CTL_PORT_SAS, scsi_transportid_iscsi_port::iscsi_name, scsi_transportid_fcp::n_port_name, ctl_wwpn_iid::name, ctl_port::port_type, scsi_transportid_spi::rel_trgt_port_id, scsi_transportid_sas::sas_address, scsi_transportid_spi::scsi_addr, SCSI_PROTO_FC, SCSI_PROTO_ISCSI, SCSI_PROTO_SAS, SCSI_PROTO_SPI, SCSI_TRN_ISCSI_FORMAT_PORT, scsi_u64to8b(), scsi_ulto2b(), ctl_port::targ_port, ctl_wwpn_iid::wwpn, and ctl_port::wwpn_iid.
Referenced by ctl_persistent_reserve_in().
void ctl_data_submit_done | ( | union ctl_io * | io | ) |
Definition at line 5153 of file ctl.c.
References ctl_done(), CTL_FLAG_ABORT, CTL_FLAG_IO_CONT, CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::flags, ctl_scsiio::io_cont, ctl_io::io_hdr, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_backend_ramdisk_move_done(), ctl_backend_ramdisk_rw(), ctl_backend_ramdisk_submit(), ctl_backend_ramdisk_ws(), ctl_be_block_next(), ctl_be_block_worker(), and ctl_complete_beio().
void ctl_datamove | ( | union ctl_io * | io | ) |
Definition at line 12538 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_datamove_done_process(), CTL_DEBUG_PRINT, CTL_DELAY_TYPE_ONESHOT, CTL_FLAG_ABORT, CTL_FLAG_DELAY_DONE, CTL_LUN, CTL_PORT, CTL_SOFTC, ctl_io_hdr::dma_start_bt, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_resid, ctl_lun::lun, ctl_io_hdr::nexus, ctl_io_hdr::port_status, ctl_io::scsiio, ctl_scsiio::tag_num, ctl_nexus::targ_lun, and ctl_nexus::targ_port.
Referenced by ctl_backend_ramdisk_compare(), ctl_backend_ramdisk_rw(), ctl_be_block_biodone(), ctl_be_block_dispatch(), ctl_be_block_dispatch_file(), ctl_be_block_dispatch_zvol(), ctl_config_read_done(), ctl_extended_copy_lid1(), ctl_extended_copy_lid4(), ctl_format(), ctl_get_config(), ctl_get_event_status(), ctl_inquiry_evpd_bdc(), ctl_inquiry_evpd_block_limits(), ctl_inquiry_evpd_devid(), ctl_inquiry_evpd_eid(), ctl_inquiry_evpd_lbp(), ctl_inquiry_evpd_mpp(), ctl_inquiry_evpd_scsi_ports(), ctl_inquiry_evpd_serial(), ctl_inquiry_evpd_sfs(), ctl_inquiry_evpd_supported(), ctl_inquiry_evpd_tpc(), ctl_inquiry_std(), ctl_log_sense(), ctl_mechanism_status(), ctl_mode_select(), ctl_mode_sense(), ctl_persistent_reserve_in(), ctl_persistent_reserve_out(), ctl_populate_token(), ctl_read_buffer(), ctl_read_capacity(), ctl_read_capacity_16(), ctl_read_defect(), ctl_read_toc(), ctl_receive_copy_failure_details(), ctl_receive_copy_operating_parameters(), ctl_receive_copy_status_lid1(), ctl_receive_copy_status_lid4(), ctl_receive_rod_token_information(), ctl_report_all_rod_tokens(), ctl_report_ident_info(), ctl_report_luns(), ctl_report_supported_opcodes(), ctl_report_supported_tmf(), ctl_report_tagret_port_groups(), ctl_report_timestamp(), ctl_request_sense(), ctl_unmap(), ctl_write_buffer(), ctl_write_same(), and ctl_write_using_token().
void ctl_datamove_done | ( | union ctl_io * | io, |
bool | samethr | ||
) |
Definition at line 12530 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_datamove_done_process(), and ctl_io::scsiio.
Referenced by cfcs_datamove(), cfi_submit_wait(), cfiscsi_data_wait_abort(), cfiscsi_datamove_in(), cfiscsi_datamove_out(), cfiscsi_pdu_handle_data_out(), ctl_ha_datamove(), ctl_handle_isc(), ctlfedone(), and tpcl_datamove().
|
static |
Definition at line 12499 of file ctl.c.
References ctl_data_print(), ctl_debug, CTL_DEBUG_CDB_DATA, CTL_FLAG_DATA_MASK, CTL_FLAG_DATA_OUT, CTL_IO_SCSI, ctl_set_internal_failure(), ctl_set_invalid_field_ciu(), CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::dma_bt, ctl_io_hdr::dma_start_bt, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_scsiio::kern_data_resid, ctl_io_hdr::num_dmas, ctl_io_hdr::port_status, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_datamove(), and ctl_datamove_done().
|
static |
Definition at line 12965 of file ctl.c.
References ctl_datamove_remote_read(), ctl_datamove_remote_write(), ctl_failover_io(), CTL_FLAG_ABORT, CTL_FLAG_DATA_IN, CTL_FLAG_DATA_MASK, CTL_FLAG_DATA_OUT, CTL_FLAG_FAILOVER, ctl_send_datamove_done(), CTL_SOFTC, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_io_hdr::nexus, ctl_io_hdr::port_status, ctl_io::scsiio, ctl_scsiio::tag_num, ctl_nexus::targ_lun, and ctl_nexus::targ_port.
Referenced by ctl_handle_isc().
|
static |
Definition at line 12719 of file ctl.c.
References CTL_LSGL, CTL_LSGLT, CTL_RSGL, ctl_send_datamove_done(), ctl_scsiio::kern_sg_entries, and ctl_io::scsiio.
Referenced by ctl_datamove_remote_read_cb().
|
static |
Definition at line 12680 of file ctl.c.
References ctl_datamove_remote_write_cb(), ctl_datamove_remote_xfer(), and CTL_HA_DT_CMD_WRITE.
Referenced by ctl_datamove_remote_write().
|
static |
Definition at line 12927 of file ctl.c.
References ctl_sg_entry::addr, ctl_datamove_remote_read_cb(), ctl_datamove_remote_sgl_setup(), ctl_datamove_remote_xfer(), CTL_HA_DT_CMD_READ, CTL_LSGL, CTL_LSGLT, CTL_RSGL, ctl_scsiio::kern_sg_entries, and ctl_io::scsiio.
Referenced by ctl_datamove_remote().
|
static |
Definition at line 12739 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_ha_dt_req::context, ctl_datamove_remote_dm_read_cb(), ctl_dt_req_free(), CTL_HA_STATUS_SUCCESS, CTL_LSGL, CTL_PORT, ctl_set_internal_failure(), ctl_scsiio::kern_data_ptr, ctl_ha_dt_req::ret, and ctl_io::scsiio.
Referenced by ctl_datamove_remote_read().
|
static |
Definition at line 12772 of file ctl.c.
References ctl_sg_entry::addr, CTL_HA_DATAMOVE_SEGMENT, CTL_LSGL, ctl_scsiio::kern_data_len, ctl_scsiio::kern_sg_entries, ctl_sg_entry::len, and ctl_io::scsiio.
Referenced by ctl_datamove_remote_read(), and ctl_datamove_remote_write().
|
static |
Definition at line 12690 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_datamove_remote_dm_write_cb(), ctl_datamove_remote_sgl_setup(), CTL_LSGL, CTL_PORT, ctl_scsiio::kern_data_ptr, and ctl_io::scsiio.
Referenced by ctl_datamove_remote().
|
static |
Definition at line 12645 of file ctl.c.
References ctl_ha_dt_req::context, ctl_dt_req_free(), CTL_HA_STATUS_SUCCESS, CTL_LSGL, CTL_LSGLT, CTL_RSGL, ctl_send_datamove_done(), ctl_set_internal_failure(), ctl_scsiio::kern_sg_entries, ctl_ha_dt_req::ret, and ctl_io::scsiio.
Referenced by ctl_datamove_remote_dm_write_cb().
|
static |
Definition at line 12806 of file ctl.c.
References ctl_sg_entry::addr, ctl_ha_dt_req::callback, ctl_ha_dt_req::command, ctl_ha_dt_req::context, ctl_dt_req_alloc(), ctl_dt_req_free(), ctl_dt_single(), CTL_FLAG_BUS_ADDR, CTL_HA_STATUS_SUCCESS, CTL_HA_STATUS_WAIT, CTL_LSGL, CTL_RSGL, ctl_send_datamove_done(), ctl_set_busy(), CTL_STATUS_MASK, CTL_STATUS_NONE, CTL_SUCCESS, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_scsiio::kern_data_len, ctl_sg_entry::len, ctl_ha_dt_req::local, ctl_ha_dt_req::remote, ctl_ha_dt_req::ret, ctl_io::scsiio, ctl_ha_dt_req::size, and ctl_io_hdr::status.
Referenced by ctl_datamove_remote_dm_write_cb(), and ctl_datamove_remote_read().
uint32_t ctl_decode_lun | ( | uint64_t | encoded | ) |
Definition at line 3749 of file ctl.c.
References ctl_lun::lun, RPL_LUNDATA_ATYP_EXTLUN, RPL_LUNDATA_ATYP_FLAT, RPL_LUNDATA_ATYP_MASK, RPL_LUNDATA_ATYP_PERIPH, RPL_LUNDATA_EXT_EAM_MASK, RPL_LUNDATA_EXT_EAM_NOT_SPEC, and RPL_LUNDATA_EXT_LEN_MASK.
Referenced by cfcs_action(), cfiscsi_pdu_handle_scsi_command(), cfiscsi_pdu_handle_task_request(), and ctlfedone().
int ctl_default_page_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
uint8_t * | page_ptr | ||
) |
Definition at line 5932 of file ctl.c.
References ctl_est_ua_all(), ctl_get_initindex(), ctl_isc_announce_mode(), CTL_LUN, CTL_PAGE_CURRENT, CTL_RETVAL_COMPLETE, CTL_UA_MODE_CHANGE, ctl_scsiio::io_hdr, ctl_lun::lun, ctl_io_hdr::nexus, ctl_page_index::page_code, ctl_page_index::page_data, ctl_page_index::page_len, and ctl_page_index::subpage.
Referenced by ctl_ie_page_handler().
|
static |
Definition at line 4898 of file ctl.c.
References ctl_isc_announce_lun(), ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_PORT_STATUS_ONLINE, ctl_lun::ctl_softc, ctl_lun::flags, ctl_lun::lun, ctl_port::lun_disable, ctl_lun::lun_lock, ctl_port::lun_map, ctl_port::port_name, ctl_port::status, ctl_port::targ_lun_arg, and ctl_port::targ_port.
Referenced by ctl_remove_lun().
|
static |
Definition at line 11869 of file ctl.c.
References ctl_clear_mask(), ctl_est_ua_all(), CTL_FLAG_ABORT, CTL_FLAG_ABORT_STATUS, CTL_MAX_INITIATORS, ctl_max_ports, ctl_tpc_lun_clear(), ctl_try_unblock_io(), ctl_io_hdr::flags, ctl_lun::flags, ctl_lun::lun_lock, ctl_lun::pending_sense, ctl_lun::prevent, and ctl_lun::prevent_count.
Referenced by ctl_lun_reset(), and ctl_target_reset().
|
static |
Definition at line 6030 of file ctl.c.
References ctl_lun::be_lun, ctl_priv::bytes, ctl_done(), CTL_LUN, CTL_NUM_MODE_PAGES, CTL_PAGE_CHANGEABLE, CTL_PAGE_CURRENT, CTL_PAGE_FLAG_CDROM, CTL_PAGE_FLAG_DIRECT, CTL_PAGE_FLAG_PROC, CTL_PRIV_MODEPAGE, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_param_len_error(), ctl_set_success(), ctl_modepage_info::header, ctl_mode_pages::index, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_ptr, ctl_modepage_header::len_left, ctl_modepage_header::len_used, ctl_lun::lun, ctl_be_lun::lun_type, ctl_lun::mode_pages, ctl_page_index::page_code, scsi_mode_page_header::page_code, ctl_page_index::page_data, ctl_page_index::page_flags, ctl_page_index::page_len, scsi_mode_page_header::page_length, scsi_mode_page_header_sp::page_length, scsi_2btoul(), ctl_io::scsiio, ctl_page_index::select_handler, SMPH_PC_MASK, SMPH_SPF, ctl_page_index::subpage, scsi_mode_page_header_sp::subpage, T_CDROM, T_DIRECT, and T_PROCESSOR.
Referenced by ctl_mode_select().
void ctl_done | ( | union ctl_io * | io | ) |
Definition at line 13362 of file ctl.c.
References ctl_scsiio::cdb, CTL_DELAY_TYPE_ONESHOT, ctl_enqueue_done(), CTL_FLAG_DELAY_DONE, CTL_FLAG_INT_COPY, CTL_IO_TASK, CTL_LUN, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_lun::lun, ctl_io_hdr::msg_type, ctl_io_hdr::nexus, ctl_io::scsiio, ctl_io_hdr::status, ctl_scsiio::tag_num, ctl_taskio::tag_num, ctl_nexus::targ_lun, ctl_nexus::targ_port, and ctl_io::taskio.
Referenced by ctl_cnw(), ctl_config_move_done(), ctl_config_read_done(), ctl_config_write_done(), ctl_copy_operation_abort(), ctl_data_submit_done(), ctl_do_mode_select(), ctl_extended_copy_lid1(), ctl_extended_copy_lid4(), ctl_failover_io(), ctl_failover_lun(), ctl_format(), ctl_get_event_status(), ctl_get_lba_status(), ctl_handle_isc(), ctl_inquiry(), ctl_inquiry_evpd(), ctl_log_sense(), ctl_mode_select(), ctl_mode_sense(), ctl_persistent_reserve_out(), ctl_populate_token(), ctl_prevent_allow(), ctl_pro_preempt(), ctl_read_buffer(), ctl_read_capacity(), ctl_read_capacity_16(), ctl_read_defect(), ctl_read_write(), ctl_receive_copy_failure_details(), ctl_receive_copy_status_lid1(), ctl_receive_copy_status_lid4(), ctl_receive_rod_token_information(), ctl_report_ident_info(), ctl_report_luns(), ctl_report_supported_opcodes(), ctl_report_tagret_port_groups(), ctl_run_task(), ctl_scsi_release(), ctl_scsi_reserve(), ctl_scsiio(), ctl_scsiio_precheck(), ctl_start_stop(), ctl_sync_cache(), ctl_try_unblock_io(), ctl_tur(), ctl_unmap(), ctl_validate_command(), ctl_verify(), ctl_write_buffer(), ctl_write_same(), ctl_write_using_token(), and tpc_process().
|
static |
Definition at line 4855 of file ctl.c.
References ctl_isc_announce_lun(), ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_PORT_STATUS_ONLINE, ctl_lun::ctl_softc, ctl_lun::flags, ctl_lun::lun, ctl_port::lun_enable, ctl_lun::lun_lock, ctl_port::lun_map, ctl_port::port_name, ctl_port::status, ctl_port::targ_lun_arg, and ctl_port::targ_port.
Referenced by ctl_add_lun().
uint64_t ctl_encode_lun | ( | uint32_t | decoded | ) |
Definition at line 3795 of file ctl.c.
References RPL_LUNDATA_ATYP_EXTLUN, RPL_LUNDATA_ATYP_FLAT, and RPL_LUNDATA_ATYP_PERIPH.
Referenced by ctl_report_luns(), ctlfe_lun_disable(), and ctlfe_lun_enable().
|
static |
Definition at line 13624 of file ctl.c.
References CTL_SOFTC, ctl_io::io_hdr, ctl_io_hdr::nexus, ctl_thread::queue_lock, ctl_nexus::targ_mapped_lun, ctl_softc::threads, and worker_threads.
Referenced by ctl_done().
|
static |
Definition at line 13595 of file ctl.c.
References CTL_SOFTC, ctl_nexus::initid, ctl_io::io_hdr, ctl_io_hdr::nexus, ctl_thread::queue_lock, ctl_nexus::targ_port, ctl_softc::threads, and worker_threads.
Referenced by ctl_queue().
|
static |
Definition at line 13637 of file ctl.c.
References CTL_SOFTC, ctl_io::io_hdr, ctl_io_hdr::nexus, ctl_thread::queue_lock, ctl_nexus::targ_mapped_lun, ctl_softc::threads, and worker_threads.
Referenced by ctl_failover_lun(), ctl_isc_event_handler(), ctl_isc_ha_link_down(), ctl_isc_handler_finish_ser_only(), and ctl_isc_handler_finish_xfer().
|
static |
Definition at line 13611 of file ctl.c.
References CTL_SOFTC, ctl_io::io_hdr, ctl_io_hdr::nexus, ctl_thread::queue_lock, ctl_nexus::targ_mapped_lun, ctl_softc::threads, and worker_threads.
Referenced by ctl_handle_isc(), ctl_scsiio_precheck(), ctl_serialize_other_sc_cmd(), and ctl_try_unblock_io().
void ctl_est_ua | ( | struct ctl_lun * | lun, |
uint32_t | initidx, | ||
ctl_ua_type | ua | ||
) |
Definition at line 1807 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, ctl_lun::ctl_softc, ctl_softc::init_max, ctl_softc::init_min, ctl_lun::lun_lock, and ctl_lun::pending_ua.
Referenced by ctl_hndl_per_res_out_on_other_sc(), ctl_i_t_nexus_loss(), ctl_isc_ua(), ctl_persistent_reserve_out(), ctl_pro_preempt(), and ctl_pro_preempt_other().
void ctl_est_ua_all | ( | struct ctl_lun * | lun, |
uint32_t | except, | ||
ctl_ua_type | ua | ||
) |
Definition at line 1837 of file ctl.c.
References ctl_est_ua_port(), ctl_lun::ctl_softc, ctl_lun::lun_lock, ctl_softc::port_max, and ctl_softc::port_min.
Referenced by ctl_add_lun(), ctl_default_page_handler(), ctl_do_lun_reset(), ctl_free_lun(), ctl_ie_page_handler(), ctl_ie_timer(), ctl_isc_ha_link_down(), ctl_isc_lun_sync(), ctl_isc_mode_sync(), ctl_isc_port_sync(), ctl_isc_ua(), ctl_lun_capacity_changed(), ctl_lun_has_media(), ctl_lun_primary(), ctl_lun_secondary(), ctl_mode_select(), ctl_port_offline(), ctl_port_online(), and ctl_thresh_thread().
void ctl_est_ua_port | ( | struct ctl_lun * | lun, |
int | port, | ||
uint32_t | except, | ||
ctl_ua_type | ua | ||
) |
Definition at line 1822 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, ctl_lun::lun_lock, and ctl_lun::pending_ua.
Referenced by ctl_est_ua_all(), and ctl_ioctl().
int ctl_expand_number | ( | const char * | buf, |
uint64_t * | num | ||
) |
Definition at line 4021 of file ctl.c.
Referenced by ctl_backend_ramdisk_create(), ctl_be_block_open_dev(), ctl_be_block_open_file(), ctl_init_page_index(), ctl_inquiry_evpd_block_limits(), and ctl_write_same().
|
static |
Definition at line 10952 of file ctl.c.
References CTL_ACTION_SKIP, ctl_extent_check_lba(), ctl_extent_check_unmap(), CTL_FLAG_SERSEQ_DONE, ctl_get_lba_len(), ctl_io_hdr::flags, and ctl_io::io_hdr.
Referenced by ctl_check_for_blockage().
|
static |
Definition at line 10903 of file ctl.c.
References CTL_ACTION_BLOCK, and CTL_ACTION_PASS.
Referenced by ctl_cmd_pattern_match(), and ctl_extent_check().
|
static |
Definition at line 10918 of file ctl.c.
References ctl_scsiio::cdb, CTL_ACTION_BLOCK, CTL_ACTION_PASS, CTL_ACTION_SKIP, CTL_FLAG_ALLOCATED, CTL_IO_SCSI, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_io_hdr::io_type, scsi_unmap_desc::lba, ctl_ptr_len_flags::len, scsi_unmap_desc::length, ctl_ptr_len_flags::ptr, scsi_4btoul(), scsi_8btou64(), ctl_io::scsiio, and UNMAP.
Referenced by ctl_extent_check().
|
static |
Definition at line 11399 of file ctl.c.
References ctl_done(), ctl_set_busy(), and ctl_io::scsiio.
Referenced by ctl_datamove_remote(), and ctl_send_datamove_done().
|
static |
Definition at line 11406 of file ctl.c.
References ctl_io_hdr::blocker, CTL_DEBUG_PRINT, ctl_done(), ctl_enqueue_isc(), CTL_FLAG_ABORT, CTL_FLAG_FAILOVER, CTL_FLAG_FROM_OTHER_SC, CTL_FLAG_IO_ACTIVE, CTL_FLAG_SENT_2OTHER_SC, ctl_free_io(), CTL_HA_MODE_XFER, ctl_softc::ctl_lock, CTL_LUN_DISABLED, ctl_softc::ctl_luns, ctl_max_luns, CTL_MSG_DATAMOVE_DONE, ctl_set_busy(), CTL_SOFTC, ctl_try_unblock_io(), ctl_try_unblock_others(), ctl_io_hdr::flags, ctl_lun::flags, ctl_softc::ha_mode, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::msg_type, ctl_io_hdr::nexus, ctl_io_hdr::port_status, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_handle_isc().
int ctl_ffz | ( | uint32_t * | mask, |
uint32_t | first, | ||
uint32_t | last | ||
) |
Definition at line 3810 of file ctl.c.
Referenced by ctl_add_lun(), and ctl_port_register().
int ctl_format | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5482 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_format::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), scsi_format_header_short::defect_list_len, scsi_format_header_long::defect_list_len, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_2btoul(), scsi_4btoul(), SF_FMTDATA, and SF_LONGLIST.
void ctl_free_io | ( | union ctl_io * | io | ) |
Definition at line 3991 of file ctl.c.
References ctl_io::io_hdr, ctl_io_hdr::pool, and ctl_io_pool::zone.
Referenced by cfcs_action(), cfcs_done(), cfiscsi_done(), cfiscsi_pdu_handle_scsi_command(), cfiscsi_pdu_handle_task_request(), cfiscsi_scsi_command_done(), cfiscsi_session_terminate_tasks(), cfiscsi_task_management_done(), ctl_failover_lun(), ctl_ha_done(), ctl_handle_isc(), ctl_ioctl_io(), ctl_queue_sense(), ctl_serialize_other_sc_cmd(), ctl_try_unblock_io(), ctlfe_free_ccb(), ctlferegister(), tpc_process_b2b(), tpc_process_register_key(), tpc_process_verify(), tpc_process_wut(), and tpc_process_zero_wut().
|
static |
Definition at line 4810 of file ctl.c.
References ctl_clear_mask(), ctl_est_ua_all(), ctl_softc::ctl_lock, ctl_softc::ctl_lun_mask, ctl_softc::ctl_luns, ctl_max_ports, ctl_lun::ctl_softc, ctl_tpc_lun_shutdown(), CTL_UA_LUN_CHANGE, ctl_lun::lun, ctl_lun::lun_lock, and ctl_softc::num_luns.
Referenced by ctl_process_done(), and ctl_remove_lun().
|
static |
Definition at line 11698 of file ctl.c.
References ctl_scsiio::cdb, CTL_CMD_FLAG_SA5, ctl_cmd_table, ctl_cmd_entry::execute, ctl_cmd_entry::flags, and SERVICE_ACTION_MASK.
Referenced by ctl_cmd_pattern_match(), ctl_handle_isc(), ctl_isc_event_handler(), ctl_process_done(), ctl_scsiio(), ctl_serialize_other_sc_cmd(), ctl_try_unblock_io(), and ctl_validate_command().
int ctl_get_config | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 10389 of file ctl.c.
References scsi_get_config_feature::add_length, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_be_lun::blocksize, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_LUN_NO_MEDIA, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_get_config_header::current_profile, scsi_get_config_header::data_length, scsi_get_config_feature::feature_code, scsi_get_config_feature::feature_data, ctl_io_hdr::flags, ctl_lun::flags, scsi_get_config_feature::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_get_config::length, ctl_lun::lun, scsi_get_config::rt, scsi_2btoul(), scsi_ulto2b(), scsi_ulto4b(), SGC_F_CURRENT, SGC_F_PERSISTENT, SGC_RT_CURRENT, SGC_RT_MASK, SGC_RT_SPECIFIC, and scsi_get_config::starting_feature.
int ctl_get_event_status | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 10596 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_get_event_status::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), ctl_done(), CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), scsi_get_event_status_header::descr_length, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_get_event_status::length, scsi_get_event_status_header::nea_class, scsi_2btoul(), scsi_ulto2b(), SGESN_NEA, SGESN_POLLED, and scsi_get_event_status_header::supported_class.
uint32_t ctl_get_initindex | ( | struct ctl_nexus * | nexus | ) |
Definition at line 3624 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, ctl_nexus::initid, and ctl_nexus::targ_port.
Referenced by ctl_copy_operation_abort(), ctl_default_page_handler(), ctl_extended_copy_lid1(), ctl_extended_copy_lid4(), ctl_hndl_per_res_out_on_other_sc(), ctl_i_t_nexus_reset(), ctl_isc_mode_sync(), ctl_isc_ua(), ctl_lun_reset(), ctl_mode_select(), ctl_persistent_reserve_out(), ctl_populate_token(), ctl_prevent_allow(), ctl_query_async_event(), ctl_queue_sense(), ctl_receive_copy_failure_details(), ctl_receive_copy_status_lid1(), ctl_receive_copy_status_lid4(), ctl_receive_rod_token_information(), ctl_report_luns(), ctl_request_sense(), ctl_scsi_release(), ctl_scsi_reserve(), ctl_scsiio_lun_check(), ctl_scsiio_precheck(), ctl_start_stop(), ctl_target_reset(), and ctl_write_using_token().
|
static |
Definition at line 10741 of file ctl.c.
References scsi_rw_6::addr, scsi_rw_10::addr, scsi_rw_12::addr, scsi_write_same_10::addr, scsi_write_verify_10::addr, scsi_write_verify_12::addr, scsi_verify_10::addr, scsi_verify_12::addr, scsi_rw_16::addr, scsi_write_atomic_16::addr, scsi_write_same_16::addr, scsi_write_verify_16::addr, scsi_get_lba_status::addr, scsi_verify_16::addr, scsi_compare_and_write::addr, ctl_scsiio::cdb, COMPARE_AND_WRITE, CTL_IO_SCSI, ctl_io::io_hdr, ctl_io_hdr::io_type, scsi_rw_6::length, scsi_rw_10::length, scsi_write_atomic_16::length, scsi_write_same_10::length, scsi_write_verify_10::length, scsi_verify_10::length, scsi_rw_12::length, scsi_rw_16::length, scsi_write_same_16::length, scsi_write_verify_12::length, scsi_write_verify_16::length, scsi_verify_12::length, scsi_verify_16::length, scsi_compare_and_write::length, READ_10, READ_12, READ_16, READ_6, scsi_2btoul(), scsi_3btoul(), scsi_4btoul(), scsi_8btou64(), ctl_io::scsiio, SERVICE_ACTION_IN, UNMAP, VERIFY_10, VERIFY_12, VERIFY_16, WRITE_10, WRITE_12, WRITE_16, WRITE_6, WRITE_ATOMIC_16, WRITE_SAME_10, WRITE_SAME_16, WRITE_VERIFY_10, WRITE_VERIFY_12, and WRITE_VERIFY_16.
Referenced by ctl_cmd_pattern_match(), ctl_extent_check(), and ctl_seq_check().
int ctl_get_lba_status | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7087 of file ctl.c.
References scsi_get_lba_status::addr, scsi_get_lba_status_data_descr::addr, scsi_get_lba_status::alloc_len, ctl_lun::backend, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_backend_driver::config_read, ctl_config_move_done(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_lba_out_of_range(), ctl_set_success(), scsi_get_lba_status_data::descr, ctl_lba_len_flags::flags, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, scsi_get_lba_status_data_descr::length, scsi_get_lba_status_data::length, ctl_lun::lun, ctl_be_lun::maxlba, scsi_4btoul(), scsi_8btou64(), scsi_u64to8b(), scsi_ulto4b(), and scsi_get_lba_status_data_descr::status.
|
static |
Definition at line 3868 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, and ctl_lun::lun.
Referenced by ctl_hndl_per_res_out_on_other_sc(), ctl_isc_announce_lun(), ctl_persistent_reserve_in(), ctl_persistent_reserve_out(), ctl_pro_preempt(), ctl_pro_preempt_other(), ctl_scsiio_lun_check(), and ctl_start_stop().
|
static |
Definition at line 649 of file ctl.c.
References ctl_sg_entry::addr, ctl_datamove_done(), CTL_FLAG_BUS_ADDR, CTL_FLAG_DMA_INPROG, CTL_FLAG_FAILOVER, CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_HA_STATUS_SUCCESS, CTL_LUN, CTL_MSG_DATAMOVE, ctl_ha_msg_dt::cur_sg_entries, ctl_ha_msg::dt, ctl_io_hdr::flags, ctl_ha_msg_dt::flags, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_scsiio::kern_data_len, ctl_ha_msg_dt::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_data_resid, ctl_ha_msg_dt::kern_data_resid, ctl_scsiio::kern_rel_offset, ctl_ha_msg_dt::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_ha_msg_dt::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_ha_msg_dt::kern_total_len, ctl_sg_entry::len, ctl_lun::lun, ctl_lun::lun_lock, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_io_hdr::port_status, ctl_io_hdr::remote_io, ctl_io::scsiio, ctl_ha_msg_dt::sent_sg_entries, ctl_ha_msg_hdr::serializing_sc, ctl_ha_msg_dt::sg_last, ctl_ha_msg_dt::sg_list, ctl_ha_msg_dt::sg_sequence, ctl_io_hdr::status, and ctl_ha_msg_hdr::status.
Referenced by ctl_isc_port_sync().
|
static |
Definition at line 767 of file ctl.c.
References ctl_free_io(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_IO_SCSI, CTL_MSG_FINISH_IO, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_io_hdr::status, ctl_ha_msg_hdr::status, ctl_scsiio::tag_num, ctl_ha_msg_scsi::tag_num, ctl_scsiio::tag_type, and ctl_ha_msg_scsi::tag_type.
Referenced by ctl_isc_port_sync().
|
static |
Definition at line 608 of file ctl.c.
References control_softc, CTL_HA_CHAN_CTL, ctl_ha_msg_destroy(), ctl_ha_msg_init(), ctl_ha_msg_register(), CTL_HA_STATUS_SUCCESS, ctl_isc_event_handler(), ctl_pool_create(), CTL_POOL_ENTRIES_OTHER_SC, ctl_pool_free(), and ctl_softc::othersc_pool.
|
static |
Definition at line 1895 of file ctl.c.
References ctl_lun::backend, CTL_FLAG_ACTIVE_SHELF, ctl_softc::ctl_lock, CTL_LUN_OK, CTL_LUN_REQ, CTL_LUNREQ_MODIFY, ctl_softc::flags, ctl_backend_driver::ioctl, ctl_lun::lun, ctl_lun_modify_params::lun_id, ctl_lunreq_data::modify, ctl_lun_req::reqdata, and ctl_lun_req::reqtype.
Referenced by ctl_init().
|
static |
Definition at line 629 of file ctl.c.
References control_softc, CTL_HA_CHAN_CTL, ctl_ha_msg_deregister(), ctl_ha_msg_destroy(), ctl_ha_msg_shutdown(), CTL_HA_STATUS_SUCCESS, ctl_pool_free(), ctl_port_deregister(), ha_frontend, ctl_softc::othersc_pool, and ctl_port::port_name.
|
static |
Definition at line 12283 of file ctl.c.
References ctl_datamove_done(), ctl_datamove_remote(), ctl_done(), ctl_enqueue_rtr(), ctl_failover_lun(), CTL_FLAG_IS_WAS_ON_RTR, ctl_free_io(), ctl_get_cmd_entry(), CTL_HA_MODE_XFER, ctl_hndl_per_res_out_on_other_sc(), ctl_softc::ctl_luns, ctl_max_luns, CTL_MSG_BAD_JUJU, CTL_MSG_DATAMOVE, CTL_MSG_DATAMOVE_DONE, CTL_MSG_FAILOVER, CTL_MSG_FINISH_IO, CTL_MSG_PERS_ACTION, CTL_MSG_R2R, CTL_MSG_SERIALIZE, ctl_scsiio_lun_check(), ctl_serialize_other_sc_cmd(), CTL_SOFTC, ctl_try_unblock_others(), ctl_io_hdr::flags, ctl_softc::ha_mode, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::msg_type, ctl_io_hdr::nexus, ctl_io::scsiio, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_work_thread().
|
static |
Definition at line 8635 of file ctl.c.
References ctl_pr_info::action, ctl_alloc_prkey(), ctl_clr_prkey(), ctl_est_ua(), ctl_get_initindex(), ctl_get_prkey(), ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_LUN_PR_RESERVED, ctl_softc::ctl_luns, CTL_MAX_INITIATORS, ctl_max_luns, CTL_PR_ALL_REGISTRANTS, CTL_PR_CLEAR, CTL_PR_NO_RESERVATION, CTL_PR_PREEMPT, CTL_PR_REG_KEY, CTL_PR_RELEASE, CTL_PR_RESERVE, CTL_PR_UNREG_KEY, ctl_pro_preempt_other(), ctl_set_prkey(), CTL_SOFTC, CTL_UA_REG_PREEMPT, CTL_UA_RES_RELEASE, ctl_ha_msg_lun::flags, ctl_ha_msg::hdr, ctl_softc::init_min, ctl_ha_msg::lun, ctl_ha_msg_hdr::nexus, ctl_ha_msg::pr, ctl_ha_msg_lun::pr_generation, ctl_ha_msg_pr::pr_info, ctl_ha_msg_lun::pr_key_count, ctl_prio::pr_msg, ctl_ha_msg_lun::pr_res_idx, ctl_ha_msg_lun::pr_res_type, ctl_io::presio, ctl_pr_info::res_type, ctl_pr_info::residx, ctl_pr_info::sa_res_key, SCP_NUAR, scsi_8btou64(), SPR_TYPE_EX_AC, SPR_TYPE_EX_AC_RO, SPR_TYPE_WR_EX, SPR_TYPE_WR_EX_RO, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_handle_isc().
|
static |
Definition at line 12016 of file ctl.c.
References ctl_abort_tasks_lun(), ctl_clear_mask(), ctl_est_ua(), ctl_is_set(), ctl_softc::ctl_lock, CTL_LUN_RESERVED, CTL_MAX_INIT_PER_PORT, ctl_tpc_lun_clear(), scsi_sense_data::error_code, ctl_lun::flags, ctl_lun::lun, ctl_lun::lun_lock, ctl_lun::pending_sense, ctl_lun::prevent, ctl_lun::prevent_count, and ctl_lun::res_idx.
Referenced by ctl_i_t_nexus_reset(), ctl_isc_iid_sync(), and ctl_remove_initiator().
|
static |
Definition at line 12052 of file ctl.c.
References CTL_FLAG_FROM_OTHER_SC, ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), ctl_i_t_nexus_loss(), CTL_MSG_MANAGE_TASKS, CTL_SOFTC, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_I_T_NEXUS_RESET, CTL_UA_I_T_NEXUS_LOSS, ctl_io_hdr::flags, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_ha_msg_hdr::serializing_sc, ctl_ha_msg::task, ctl_ha_msg_task::task_action, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
|
static |
Definition at line 2559 of file ctl.c.
References ctl_devid::data, scsi_vpd_id_descriptor::id_type, scsi_vpd_id_descriptor::identifier, ctl_devid::len, scsi_vpd_id_descriptor::length, scsi_vpd_id_descriptor::proto_codeset, SVPD_ID_CODESET_ASCII, SVPD_ID_CODESET_BINARY, SVPD_ID_CODESET_MASK, SVPD_ID_CODESET_UTF8, SVPD_ID_TYPE_EUI64, SVPD_ID_TYPE_MASK, SVPD_ID_TYPE_NAA, SVPD_ID_TYPE_SCSI_NAME, and SVPD_ID_TYPE_T10.
Referenced by ctl_ioctl().
int ctl_ie_log_sense_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
int | pc | ||
) |
Definition at line 6881 of file ctl.c.
References ctl_lun::be_lun, CTL_LUN, scsi_log_informational_exceptions::hdr, ctl_lun::ie_asc, scsi_log_informational_exceptions::ie_asc, ctl_lun::ie_ascq, scsi_log_informational_exceptions::ie_ascq, ctl_lun::lun, ctl_be_lun::options, ctl_page_index::page_data, scsi_log_param_header::param_code, scsi_log_param_header::param_control, scsi_log_param_header::param_len, scsi_ulto2b(), SLP_IE_GEN, SLP_LBIN, and scsi_log_informational_exceptions::temperature.
int ctl_ie_page_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
uint8_t * | page_ptr | ||
) |
Definition at line 5987 of file ctl.c.
References ctl_clr_ua_all(), ctl_default_page_handler(), ctl_est_ua_all(), ctl_ie_timer(), CTL_LUN, CTL_RETVAL_COMPLETE, CTL_UA_IE, ctl_lun::ie_asc, ctl_lun::ie_ascq, ctl_lun::ie_callout, ctl_lun::ie_reportcnt, ctl_lun::ie_reported, scsi_info_exceptions_page::info_flags, scsi_info_exceptions_page::interval_timer, ctl_lun::lun, ctl_lun::lun_lock, scsi_info_exceptions_page::mrie, scsi_info_exceptions_page::report_count, scsi_4btoul(), SIEP_FLAGS_TEST, and SIEP_MRIE_UA.
|
static |
Definition at line 5963 of file ctl.c.
References ctl_est_ua_all(), CTL_UA_IE, ctl_lun::lun, scsi_4btoul(), and SIEP_MRIE_UA.
Referenced by ctl_ie_page_handler().
|
static |
Definition at line 1930 of file ctl.c.
References control_softc, ctl_cdevsw, CTL_DEFAULT_MAX_LUNS, CTL_DEFAULT_MAX_PORTS, CTL_FLAG_ACTIVE_SHELF, ctl_frontend_register(), ctl_ha_role_sysctl(), ctl_softc::ctl_lock, ctl_softc::ctl_lun_mask, ctl_softc::ctl_luns, CTL_MAX_INIT_PER_PORT, ctl_max_luns, ctl_max_ports, CTL_MAX_THREADS, ctl_softc::ctl_port_mask, ctl_softc::ctl_ports, ctl_softc::ctl_proc, ctl_thread::ctl_softc, ctl_thresh_thread(), ctl_tpc_init(), ctl_work_thread(), ctl_softc::dev, ctl_softc::flags, ha_frontend, ctl_softc::ha_id, ctl_softc::ha_link, ctl_softc::ha_mode, ctl_softc::init_max, ctl_softc::init_min, ctl_softc::io_zone, ctl_softc::is_single, NUM_HA_SHELVES, ctl_softc::port_cnt, ctl_softc::port_max, ctl_softc::port_min, ctl_thread::queue_lock, ctl_softc::sysctl_ctx, ctl_softc::sysctl_tree, ctl_thread::thread, ctl_softc::threads, ctl_softc::thresh_thread, and worker_threads.
Referenced by ctl_module_event_handler().
|
static |
Definition at line 4483 of file ctl.c.
References ctl_lun::backend, ctl_lun::be_lun, CTL_NUM_LBP_PARAMS, CTL_NUM_LOG_PAGES, CTL_PAGE_FLAG_CDROM, CTL_PAGE_FLAG_DIRECT, CTL_PAGE_FLAG_PROC, CTL_RETVAL_COMPLETE, ctl_log_pages::ie_page, ctl_log_pages::index, ctl_log_pages::lbp_page, log_page_index_template, ctl_lun::log_pages, ctl_backend_driver::lun_attr, ctl_be_lun::lun_type, ctl_page_index::page_code, ctl_page_index::page_data, ctl_page_index::page_flags, ctl_page_index::page_len, ctl_log_pages::pages_page, SLS_LOGICAL_BLOCK_PROVISIONING, ctl_log_pages::stat_page, ctl_page_index::subpage, ctl_log_pages::subpages_page, T_CDROM, T_DIRECT, T_PROCESSOR, and ctl_log_pages::temp_page.
Referenced by ctl_add_lun().
|
static |
Definition at line 4070 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::blocksize, scsi_format_page::bytes_per_sector, ctl_mode_pages::caching_page, caching_page_changeable, caching_page_default, ctl_mode_pages::cddvd_page, cddvd_page_changeable, cddvd_page_default, ctl_mode_pages::control_ext_page, control_ext_page_changeable, control_ext_page_default, ctl_mode_pages::control_page, control_page_changeable, control_page_default, CTL_DEFAULT_HEADS, CTL_DEFAULT_SECTORS_PER_TRACK, ctl_expand_number(), CTL_LBP_EXPONENT, CTL_NUM_MODE_PAGES, CTL_PAGE_CHANGEABLE, CTL_PAGE_CURRENT, CTL_PAGE_DEFAULT, CTL_PAGE_FLAG_CDROM, CTL_PAGE_FLAG_DIRECT, CTL_PAGE_FLAG_PROC, CTL_PAGE_SAVED, scsi_rigid_disk_page::cylinders, scsi_caching_page::flags1, ctl_mode_pages::format_page, format_page_changeable, format_page_default, ctl_mode_pages::ie_page, ie_page_changeable, ie_page_default, ctl_mode_pages::index, ctl_mode_pages::lbp_page, lbp_page_changeable, lbp_page_default, ctl_be_lun::lun_type, ctl_be_lun::maxlba, ctl_lun::mode_pages, ctl_be_lun::options, ctl_page_index::page_code, scsi_control_page::page_code, scsi_caching_page::page_code, scsi_format_page::page_code, scsi_rigid_disk_page::page_code, ctl_page_index::page_data, ctl_page_index::page_flags, page_index_template, scsi_control_page::queue_flags, ctl_mode_pages::rigid_disk_page, rigid_disk_page_changeable, rigid_disk_page_default, scsi_rigid_disk_page::rotation_rate, ctl_mode_pages::rw_er_page, rw_er_page_changeable, rw_er_page_default, SCP_QUEUE_ALG_UNRESTRICTED, SCP_RCD, scsi_ulto2b(), scsi_ulto3b(), scsi_ulto4b(), SLBPPD_ARMING_DEC, SLBPPD_ARMING_INC, SLBPPD_ENABLED, SMPH_PC_MASK, SMS_CACHING_PAGE, SMS_CDDVD_CAPS_PAGE, SMS_CONTROL_MODE_PAGE, SMS_FORMAT_DEVICE_PAGE, SMS_INFO_EXCEPTIONS_PAGE, SMS_RIGID_DISK_PAGE, SMS_RW_ERROR_RECOVERY_PAGE, SMS_SUBPAGE_PAGE_0, SMS_VERIFY_ERROR_RECOVERY_PAGE, ctl_page_index::subpage, T_CDROM, T_DIRECT, T_PROCESSOR, ctl_mode_pages::verify_er_page, verify_er_page_changeable, and verify_er_page_default.
Referenced by ctl_add_lun(), and ctl_mode_select().
Definition at line 12421 of file ctl.c.
References CTL_AUTOSENSE, ctl_cmd_pattern_match(), CTL_FLAG_DATA_MASK, CTL_FLAG_DATA_OUT, CTL_LUN_INJ_ABORTED, CTL_LUN_INJ_CONTINUOUS, CTL_LUN_INJ_CUSTOM, CTL_LUN_INJ_MEDIUM_ERR, CTL_LUN_INJ_NONE, CTL_LUN_INJ_TYPE, CTL_LUN_INJ_UA, CTL_LUN_PAT_MASK, CTL_LUN_PAT_NONE, CTL_SCSI_ERROR, ctl_set_aborted(), ctl_set_medium_error(), ctl_set_ua(), ctl_error_desc::custom_sense, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_error_desc::lun_error, ctl_lun::lun_lock, ctl_scsiio::scsi_status, SCSI_STATUS_CHECK_COND, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_scsiio::sense_len, SSD_FULL_SIZE, and ctl_io_hdr::status.
Referenced by ctl_process_done().
int ctl_inquiry | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 10362 of file ctl.c.
References scsi_inquiry::byte2, ctl_scsiio::cdb, CTL_DEBUG_PRINT, ctl_done(), ctl_inquiry_evpd(), ctl_inquiry_std(), CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), scsi_inquiry::page_code, and SI_EVPD.
|
static |
Definition at line 10099 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::cdb, ctl_done(), ctl_inquiry_evpd_bdc(), ctl_inquiry_evpd_block_limits(), ctl_inquiry_evpd_devid(), ctl_inquiry_evpd_eid(), ctl_inquiry_evpd_lbp(), ctl_inquiry_evpd_mpp(), ctl_inquiry_evpd_scsi_ports(), ctl_inquiry_evpd_serial(), ctl_inquiry_evpd_sfs(), ctl_inquiry_evpd_supported(), ctl_inquiry_evpd_tpc(), CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), scsi_inquiry::length, ctl_lun::lun, ctl_be_lun::lun_type, scsi_inquiry::page_code, scsi_2btoul(), SVPD_BDC, SVPD_BLOCK_LIMITS, SVPD_DEVICE_ID, SVPD_EXTENDED_INQUIRY_DATA, SVPD_LBP, SVPD_MODE_PAGE_POLICY, SVPD_SCSI_PORTS, SVPD_SCSI_SFS, SVPD_SCSI_TPC, SVPD_SUPPORTED_PAGES, SVPD_UNIT_SERIAL_NUMBER, and T_DIRECT.
Referenced by ctl_inquiry().
|
static |
Definition at line 9999 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_DEFAULT_ROTATION_RATE, CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_block_device_characteristics::device, ctl_io_hdr::flags, scsi_vpd_block_device_characteristics::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_block_device_characteristics::medium_rotation_rate, ctl_be_lun::options, scsi_vpd_block_device_characteristics::page_code, scsi_vpd_block_device_characteristics::page_length, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_BDC, SVPD_FUAB, SVPD_RBWZ, SVPD_VBULS, T_DIRECT, and scsi_vpd_block_device_characteristics::wab_wac_ff.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9923 of file ctl.c.
References scsi_vpd_block_limits::atomic_alignment, scsi_vpd_block_limits::atomic_transfer_length_granularity, ctl_be_lun::atomicblock, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), ctl_expand_number(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_LUN_FLAG_UNMAP, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_block_limits::device, ctl_be_lun::flags, ctl_io_hdr::flags, scsi_vpd_block_limits::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_block_limits::max_atomic_boundary_size, scsi_vpd_block_limits::max_atomic_transfer_length, scsi_vpd_block_limits::max_atomic_transfer_length_with_atomic_boundary, scsi_vpd_block_limits::max_cmp_write_len, scsi_vpd_block_limits::max_txfer_len, scsi_vpd_block_limits::max_unmap_blk_cnt, scsi_vpd_block_limits::max_unmap_lba_cnt, scsi_vpd_block_limits::max_write_same_length, ctl_be_lun::maxlba, scsi_vpd_block_limits::opt_txfer_len, scsi_vpd_block_limits::opt_unmap_grain, ctl_be_lun::options, ctl_be_lun::opttxferlen, scsi_vpd_block_limits::page_code, scsi_vpd_block_limits::page_length, scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_BL_WSNZ, SVPD_BLOCK_LIMITS, T_DIRECT, ctl_be_lun::ublockexp, ctl_be_lun::ublockoff, and scsi_vpd_block_limits::unmap_grain_align.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9666 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_PORT, CTL_PORT_FC, CTL_PORT_ISCSI, CTL_PORT_SAS, CTL_PORT_STATUS_HA_SHARED, CTL_RETVAL_COMPLETE, ctl_set_success(), CTL_SOFTC, ctl_devid::data, scsi_vpd_device_id::desc_list, scsi_vpd_device_id::device, ctl_io_hdr::flags, scsi_vpd_id_descriptor::id_type, scsi_vpd_id_descriptor::identifier, ctl_scsiio::io_hdr, ctl_softc::is_single, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_devid::len, scsi_vpd_device_id::length, scsi_vpd_id_descriptor::length, ctl_lun::lun, ctl_lun::lun_devid, ctl_be_lun::lun_type, ctl_io_hdr::nexus, scsi_vpd_device_id::page_code, ctl_softc::port_cnt, ctl_port::port_devid, ctl_port::port_type, scsi_vpd_id_descriptor::proto_codeset, SCSI_PROTO_FC, SCSI_PROTO_ISCSI, SCSI_PROTO_SAS, SCSI_PROTO_SPI, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, ctl_port::status, SVPD_DEVICE_ID, SVPD_ID_ASSOC_PORT, SVPD_ID_CODESET_BINARY, SVPD_ID_PIV, SVPD_ID_TYPE_RELTARG, SVPD_ID_TYPE_TPORTGRP, T_DIRECT, ctl_nexus::targ_port, and ctl_port::target_devid.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9560 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_extended_inquiry_data::device, ctl_io_hdr::flags, scsi_vpd_extended_inquiry_data::flags2, scsi_vpd_extended_inquiry_data::flags3, scsi_vpd_extended_inquiry_data::flags4, scsi_vpd_extended_inquiry_data::flags5, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_extended_inquiry_data::max_sense_length, scsi_vpd_extended_inquiry_data::page_code, scsi_vpd_extended_inquiry_data::page_length, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_EID_HEADSUP, SVPD_EID_LUICLR, SVPD_EID_ORDSUP, SVPD_EID_RTD_SUP, SVPD_EID_SIMPSUP, SVPD_EID_V_SUP, SVPD_EXTENDED_INQUIRY_DATA, and T_DIRECT.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 10047 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LBP_EXPONENT, CTL_LUN, CTL_LUN_FLAG_UNMAP, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_logical_block_prov::device, ctl_be_lun::flags, ctl_io_hdr::flags, scsi_vpd_logical_block_prov::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, ctl_be_lun::options, scsi_vpd_logical_block_prov::page_code, scsi_vpd_logical_block_prov::page_length, scsi_vpd_logical_block_prov::prov_type, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_LBP, SVPD_LBP_ANC_SUP, SVPD_LBP_RESOURCE, SVPD_LBP_RZ, SVPD_LBP_THIN, SVPD_LBP_UNMAP, SVPD_LBP_WS10, SVPD_LBP_WS16, T_DIRECT, and scsi_vpd_logical_block_prov::threshold_exponent.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9624 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_mode_page_policy::descr, scsi_vpd_mode_page_policy::device, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_mode_page_policy_descr::page_code, scsi_vpd_mode_page_policy::page_code, scsi_vpd_mode_page_policy::page_length, scsi_vpd_mode_page_policy_descr::policy, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, scsi_vpd_mode_page_policy_descr::subpage_code, SVPD_MODE_PAGE_POLICY, SVPD_MPP_SHARED, and T_DIRECT.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9779 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, ctl_softc::ctl_lock, CTL_LUN, ctl_lun_map_to_port(), CTL_PORT_STATUS_ONLINE, CTL_RETVAL_COMPLETE, ctl_set_success(), CTL_SOFTC, ctl_devid::data, scsi_vpd_scsi_ports::design, scsi_vpd_scsi_ports::device, ctl_io_hdr::flags, ctl_port::init_devid, scsi_vpd_port_designation::initiator_transportid, scsi_vpd_port_designation::initiator_transportid_length, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_devid::len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_scsi_ports::page_code, scsi_vpd_scsi_ports::page_length, ctl_port::port_devid, scsi_vpd_port_designation::relative_port_id, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, ctl_port::status, SVPD_SCSI_PORTS, T_DIRECT, ctl_port::targ_port, scsi_vpd_port_designation_cont::target_port_descriptors, and scsi_vpd_port_designation_cont::target_port_descriptors_length.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9512 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), CTL_SN_LEN, scsi_vpd_unit_serial_number::device, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_vpd_unit_serial_number::length, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_unit_serial_number::page_code, ctl_be_lun::serial_num, scsi_vpd_unit_serial_number::serial_num, SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_UNIT_SERIAL_NUMBER, and T_DIRECT.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9871 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, scsi_vpd_sfs::codes, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_LUN_FLAG_UNMAP, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_sfs::device, ctl_be_lun::flags, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_sfs::page_code, scsi_vpd_sfs::page_length, scsi_ulto2b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_SCSI_SFS, and T_DIRECT.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 9447 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), scsi_vpd_supported_pages::device, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_vpd_supported_pages::length, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_supported_pages::page_list, SCSI_EVPD_NUM_SUPPORTED_PAGES, SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SVPD_BDC, SVPD_BLOCK_LIMITS, SVPD_DEVICE_ID, SVPD_EXTENDED_INQUIRY_DATA, SVPD_LBP, SVPD_MODE_PAGE_POLICY, SVPD_SCSI_PORTS, SVPD_SCSI_SFS, SVPD_SCSI_TPC, SVPD_SUPPORTED_PAGES, SVPD_UNIT_SERIAL_NUMBER, and T_DIRECT.
Referenced by ctl_inquiry_evpd().
|
static |
Definition at line 10168 of file ctl.c.
References scsi_inquiry_data::additional_length, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_scsiio::cdb, CTL_CDROM_PRODUCT, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, CTL_DIRECT_PRODUCT, CTL_FLAG_ALLOCATED, CTL_HA_LINK_UNKNOWN, CTL_LUN, CTL_LUN_PRIMARY_SC, CTL_LUN_REMOVABLE, CTL_PORT, CTL_PORT_FC, CTL_PORT_INTERNAL, CTL_PORT_IOCTL, CTL_PORT_ISCSI, CTL_PORT_SAS, CTL_PORT_SCSI, CTL_PORT_UMASS, CTL_PROCESSOR_PRODUCT, CTL_RETVAL_COMPLETE, ctl_set_success(), CTL_SOFTC, CTL_UNKNOWN_PRODUCT, CTL_VENDOR, scsi_inquiry_data::dev_qual2, scsi_inquiry_data::device, ctl_io_hdr::flags, ctl_lun::flags, scsi_inquiry_data::flags, ctl_softc::ha_link, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_inquiry::length, ctl_lun::lun, ctl_be_lun::lun_type, ctl_be_lun::options, ctl_port::port_type, scsi_inquiry_data::product, scsi_inquiry_data::response_format, scsi_inquiry_data::revision, scsi_2btoul(), SCSI_REV_SPC5, scsi_ulto2b(), SID_CmdQue, SID_HiSup, SID_QUAL_BAD_LU, SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SID_RMB, SID_SPI_CLOCK_DT_ST, SID_SPI_IUS, SID_SPI_QAS, SID_Sync, SID_WBus16, scsi_inquiry_data::spc2_flags, SPC2_SID_ADDR16, SPC2_SID_MultiP, scsi_inquiry_data::spc3_flags, SPC3_SID_3PC, SPC3_SID_TPGS_IMPLICIT, scsi_inquiry_data::spi3data, T_CDROM, T_DIRECT, T_NODEVICE, T_PROCESSOR, scsi_inquiry_data::vendor, scsi_inquiry_data::version, scsi_inquiry_data::version1, scsi_inquiry_data::version2, scsi_inquiry_data::version3, and scsi_inquiry_data::version4.
Referenced by ctl_inquiry().
|
static |
Definition at line 2596 of file ctl.c.
References ctl_ooa::alloc_len, ctl_lun_list::alloc_len, ctl_ooa::alloc_num, ctl_lun_req::args, ctl_req::args, ctl_lun_req::args_len, ctl_req::args_len, ctl_lun_req::args_nvl, ctl_req::args_nvl, ctl_lun_req::backend, ctl_lun::backend, ctl_lun::be_lun, ctl_be_lun::blocksize, ctl_backend_find(), CTL_DELAY_IO, CTL_DELAY_LOC_DATAMOVE, CTL_DELAY_LOC_DONE, CTL_DELAY_STATUS_INVALID_LOC, CTL_DELAY_STATUS_INVALID_LUN, CTL_DELAY_STATUS_INVALID_TYPE, CTL_DELAY_STATUS_NOT_IMPLEMENTED, CTL_DELAY_STATUS_OK, CTL_DELAY_TYPE_CONT, CTL_DELAY_TYPE_ONESHOT, CTL_DISABLE_PORT, CTL_DUMP_STRUCTS, CTL_ENABLE_PORT, CTL_ERROR_INJECT, CTL_ERROR_INJECT_DELETE, ctl_est_ua_port(), ctl_frontend_find(), CTL_GET_LUN_STATS, CTL_GET_OOA, CTL_GET_PORT_STATS, ctl_id_sbuf(), CTL_IO, ctl_ioctl_fill_ooa(), ctl_ioctl_io(), ctl_isc_announce_port(), CTL_ISCSI, CTL_ISCSI_ERROR, ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_LUN_ERROR, CTL_LUN_LIST, CTL_LUN_LIST_ERROR, CTL_LUN_LIST_NEED_MORE_SPACE, CTL_LUN_LIST_OK, CTL_LUN_MAP, ctl_lun_map_deinit(), ctl_lun_map_from_port(), ctl_lun_map_init(), ctl_lun_map_set(), ctl_lun_map_to_port(), ctl_lun_map_unset(), CTL_LUN_REQ, ctl_softc::ctl_luns, CTL_MAX_INIT_PER_PORT, ctl_max_luns, ctl_max_ports, CTL_OOA_FLAG_ALL_LUNS, CTL_OOA_NEED_MORE_SPACE, CTL_OOA_OK, CTL_PORT_LIST, CTL_PORT_NONE, ctl_port_offline(), ctl_port_online(), CTL_PORT_REQ, ctl_port_set_wwns(), CTL_PORT_STATUS_ONLINE, CTL_PORT_WWNN_VALID, CTL_PORT_WWPN_VALID, ctl_softc::ctl_ports, ctl_sbuf_printf_esc(), CTL_SET_PORT_WWNS, CTL_SS_NEED_MORE_SPACE, CTL_SS_OK, CTL_STATS_FLAG_NONE, CTL_STATS_FLAG_TIME_VALID, CTL_UA_LUN_CHANGE, ctl_ooa::cur_bt, ctl_lun_delay_info::datamove_delay, ctl_lun_delay_info::datamove_type, ctl_lun::delay_info, ctl_io_delay_info::delay_loc, ctl_io_delay_info::delay_secs, ctl_io_delay_info::delay_type, ctl_softc::dev, ctl_be_lun::device_id, ctl_lun_delay_info::done_delay, ctl_lun_delay_info::done_type, ctl_req::driver, ctl_ooa::dropped_num, ctl_ooa::entries, ctl_lun::error_serial, ctl_lun_req::error_str, ctl_lun_list::error_str, ctl_req::error_str, ctl_iscsi::error_str, ctl_frontend::fe_dump, ctl_ooa::fill_len, ctl_lun_list::fill_len, ctl_ooa::fill_num, ctl_port_entry::flags, ctl_ooa::flags, ctl_lun::flags, ctl_port::frontend, ctl_wwpn_iid::in_use, ctl_backend_driver::ioctl, ctl_frontend::ioctl, ctl_lun_map::lun, ctl_lun::lun, ctl_io_delay_info::lun_id, ctl_error_desc::lun_id, ctl_backend_driver::lun_info, ctl_lun::lun_lock, ctl_port::lun_map, ctl_port::lun_map_size, ctl_ooa::lun_num, ctl_be_lun::lun_type, ctl_lun_list::lun_xml, ctl_be_lun::maxlba, ctl_backend_driver::name, ctl_wwpn_iid::name, ctl_frontend::name, ctl_softc::num_luns, ctl_softc::num_ports, ctl_port::onoff_arg, ctl_be_lun::options, ctl_port::options, ctl_port::physical_port, ctl_lun_map::plun, ctl_lun_map::port, ctl_port::port_devid, ctl_port::port_info, ctl_softc::port_max, ctl_softc::port_min, ctl_port::port_name, ctl_port_entry::port_type, ctl_port::port_type, ctl_lun::pr_keys, ctl_lun_req::result, ctl_req::result, ctl_lun_req::result_len, ctl_req::result_len, ctl_lun_req::result_nvl, ctl_req::result_nvl, ctl_error_desc::serial, ctl_be_lun::serial_num, ctl_port::stats, ctl_get_io_stats::stats, ctl_lun::stats, ctl_port::status, ctl_io_delay_info::status, ctl_ooa::status, ctl_lun_req::status, ctl_lun_list::status, ctl_req::status, ctl_iscsi::status, ctl_port_entry::targ_port, ctl_port::targ_port, ctl_port::target_devid, ctl_port::virtual_port, ctl_port_entry::wwnn, ctl_port::wwnn, ctl_port_entry::wwpn, ctl_wwpn_iid::wwpn, ctl_port::wwpn, and ctl_port::wwpn_iid.
|
static |
Definition at line 2464 of file ctl.c.
References ctl_ooa::alloc_num, ctl_io_hdr::blocker, ctl_scsiio::cdb, ctl_ooa_entry::cdb, ctl_scsiio::cdb_len, ctl_ooa_entry::cdb_len, ctl_ooa_entry::cmd_flags, CTL_FLAG_ABORT, CTL_FLAG_DMA_INPROG, CTL_FLAG_DMA_QUEUED, CTL_FLAG_IS_WAS_ON_RTR, CTL_FLAG_STATUS_QUEUED, CTL_FLAG_STATUS_SENT, CTL_OOACMD_FLAG_ABORT, CTL_OOACMD_FLAG_BLOCKED, CTL_OOACMD_FLAG_DMA, CTL_OOACMD_FLAG_DMA_QUEUED, CTL_OOACMD_FLAG_RTR, CTL_OOACMD_FLAG_STATUS_QUEUED, CTL_OOACMD_FLAG_STATUS_SENT, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_ooa_entry::lun_num, ctl_io::scsiio, ctl_io_hdr::start_bt, ctl_ooa_entry::start_bt, ctl_scsiio::tag_num, and ctl_ooa_entry::tag_num.
Referenced by ctl_ioctl().
int ctl_is_set | ( | uint32_t * | mask, |
uint32_t | bit | ||
) |
Definition at line 3854 of file ctl.c.
Referenced by ctl_add_lun(), ctl_i_t_nexus_loss(), and ctl_prevent_allow().
void ctl_isc_announce_iid | ( | struct ctl_port * | port, |
int | iid | ||
) |
Definition at line 957 of file ctl.c.
References CTL_HA_CHAN_CTL, CTL_HA_LINK_ONLINE, ctl_ha_msg_send(), ctl_softc::ctl_lock, CTL_MSG_IID_SYNC, ctl_port::ctl_softc, ctl_ha_msg_iid::data, ctl_softc::ha_link, ctl_ha_msg::hdr, ctl_ha_msg::iid, ctl_ha_msg_iid::in_use, ctl_nexus::initid, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_iid::name_len, ctl_ha_msg_hdr::nexus, ctl_ha_msg::port, ctl_softc::port_max, ctl_softc::port_min, ctl_nexus::targ_port, and ctl_ha_msg_iid::wwpn.
Referenced by ctl_add_initiator(), ctl_isc_ha_link_up(), and ctl_remove_initiator().
void ctl_isc_announce_lun | ( | struct ctl_lun * | lun | ) |
Definition at line 831 of file ctl.c.
References ctl_get_prkey(), CTL_HA_CHAN_CTL, CTL_HA_LINK_ONLINE, ctl_ha_msg_send(), ctl_isc_announce_mode(), CTL_LUN_PRIMARY_SC, CTL_MAX_INITIATORS, CTL_MSG_LUN_SYNC, CTL_NUM_MODE_PAGES, ctl_lun::ctl_softc, ctl_ha_msg_lun::data, ctl_devid::data, ctl_ha_msg_lun::flags, ctl_lun::flags, ctl_softc::ha_link, ctl_ha_msg::hdr, ctl_mode_pages::index, ctl_devid::len, ctl_ha_msg::lun, ctl_lun::lun, ctl_lun::lun_devid, ctl_ha_msg_lun::lun_devid_len, ctl_lun::lun_lock, ctl_lun::mode_pages, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_hdr::nexus, ctl_page_index::page_code, ctl_ha_msg_lun::pr_generation, ctl_lun::pr_generation, ctl_ha_msg_lun_pr_key::pr_key, ctl_ha_msg_lun::pr_key_count, ctl_lun::pr_key_count, ctl_ha_msg_lun::pr_res_idx, ctl_lun::pr_res_idx, ctl_ha_msg_lun::pr_res_type, ctl_lun::pr_res_type, SMPH_PC_MASK, ctl_page_index::subpage, ctl_nexus::targ_lun, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_disable_lun(), ctl_enable_lun(), ctl_isc_ha_link_up(), ctl_isc_lun_sync(), ctl_lun_primary(), and ctl_lun_secondary().
void ctl_isc_announce_mode | ( | struct ctl_lun * | lun, |
uint32_t | initidx, | ||
uint8_t | page, | ||
uint8_t | subpage | ||
) |
Definition at line 993 of file ctl.c.
References CTL_HA_CHAN_CTL, CTL_HA_LINK_ONLINE, ctl_ha_msg_send(), CTL_MAX_INIT_PER_PORT, CTL_MSG_MODE_SYNC, CTL_NUM_MODE_PAGES, ctl_lun::ctl_softc, ctl_ha_msg_mode::data, ctl_softc::ha_link, ctl_ha_msg::hdr, ctl_nexus::initid, ctl_ha_msg::lun, ctl_ha_msg::mode, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_hdr::nexus, ctl_ha_msg_mode::page_code, ctl_ha_msg_mode::page_len, SMPH_PC_MASK, ctl_ha_msg_mode::subpage, ctl_nexus::targ_lun, ctl_nexus::targ_mapped_lun, and ctl_nexus::targ_port.
Referenced by ctl_default_page_handler(), ctl_isc_announce_lun(), and ctl_mode_select().
void ctl_isc_announce_port | ( | struct ctl_port * | port | ) |
Definition at line 896 of file ctl.c.
References CTL_HA_CHAN_CTL, CTL_HA_LINK_ONLINE, ctl_ha_msg_send(), CTL_MSG_PORT_SYNC, ctl_port::ctl_softc, ctl_ha_msg_port::data, ctl_softc::ha_id, ctl_softc::ha_link, ctl_ha_msg::hdr, ctl_ha_msg_port::init_devid_len, ctl_ha_msg_port::lun_map_len, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_port::name_len, ctl_ha_msg_hdr::nexus, ctl_ha_msg_port::physical_port, ctl_ha_msg::port, ctl_ha_msg_port::port_devid_len, ctl_softc::port_max, ctl_softc::port_min, ctl_ha_msg_port::port_type, ctl_ha_msg_port::status, ctl_nexus::targ_port, ctl_ha_msg_port::target_devid_len, and ctl_ha_msg_port::virtual_port.
Referenced by ctl_ioctl(), ctl_isc_ha_link_up(), ctl_lun_map_deinit(), ctl_lun_map_init(), ctl_lun_map_set(), ctl_lun_map_unset(), ctl_port_offline(), and ctl_port_online().
|
static |
Definition at line 1488 of file ctl.c.
References ctl_sg_entry::addr, ctl_scsiio::cdb, ctl_ha_msg_scsi::cdb, ctl_scsiio::cdb_len, ctl_ha_msg_scsi::cdb_len, control_softc, ctl_alloc_io(), ctl_copy_sense_data(), CTL_DEBUG_PRINT, ctl_enqueue_isc(), CTL_FLAG_BUS_ADDR, CTL_FLAG_DATA_MASK, CTL_FLAG_FROM_OTHER_SC, CTL_FLAG_INT_COPY, CTL_FLAG_IO_ACTIVE, CTL_FLAG_STATUS_SENT, ctl_get_cmd_entry(), CTL_HA_CHAN_CTL, CTL_HA_DATAMOVE_SEGMENT, CTL_HA_EVT_LINK_CHANGE, CTL_HA_EVT_MSG_RECV, CTL_HA_LINK_ONLINE, CTL_HA_MODE_XFER, ctl_ha_msg_abort(), ctl_ha_msg_recv(), CTL_HA_STATUS_SUCCESS, CTL_IO_SCSI, CTL_IO_TASK, ctl_isc_ha_link_down(), ctl_isc_ha_link_up(), ctl_isc_handler_finish_ser_only(), ctl_isc_handler_finish_xfer(), ctl_isc_iid_sync(), ctl_isc_login(), ctl_isc_lun_sync(), ctl_isc_mode_sync(), ctl_isc_port_sync(), ctl_isc_ua(), CTL_LSGL, CTL_MAX_CDBLEN, CTL_MSG_BAD_JUJU, CTL_MSG_DATAMOVE, CTL_MSG_DATAMOVE_DONE, CTL_MSG_FINISH_IO, CTL_MSG_IID_SYNC, CTL_MSG_LOGIN, CTL_MSG_LUN_SYNC, CTL_MSG_MANAGE_TASKS, CTL_MSG_MODE_SYNC, CTL_MSG_PERS_ACTION, CTL_MSG_PORT_SYNC, CTL_MSG_R2R, CTL_MSG_SERIALIZE, CTL_MSG_UA, CTL_RSGL, ctl_run_task(), CTL_STATUS_NONE, CTL_SUCCESS, ctl_zero_io(), ctl_ha_msg_dt::cur_sg_entries, ctl_io_hdr::dma_start_bt, ctl_ha_msg::dt, ctl_io_hdr::flags, ctl_ha_msg_dt::flags, ctl_cmd_entry::flags, ctl_softc::ha_link, ctl_softc::ha_mode, ctl_ha_msg::hdr, ctl_taskio::io_hdr, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_scsiio::kern_data_len, ctl_ha_msg_dt::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_data_resid, ctl_ha_msg_dt::kern_data_resid, ctl_ha_msg_scsi::kern_data_resid, ctl_scsiio::kern_rel_offset, ctl_ha_msg_dt::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_ha_msg_dt::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_ha_msg_dt::kern_total_len, ctl_sg_entry::len, ctl_io_hdr::msg_type, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_softc::othersc_pool, ctl_io_hdr::port_status, ctl_ha_msg_scsi::port_status, ctl_ha_msg::pr, ctl_scsiio::priority, ctl_ha_msg_scsi::priority, ctl_scsiio::rem_sg_entries, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_ha_msg_dt::sent_sg_entries, ctl_ha_msg_hdr::serializing_sc, ctl_ha_msg_dt::sg_last, ctl_ha_msg_dt::sg_list, ctl_ha_msg_dt::sg_sequence, ctl_io_hdr::start_bt, ctl_io_hdr::start_time, ctl_io_hdr::status, ctl_ha_msg_hdr::status, ctl_scsiio::tag_num, ctl_taskio::tag_num, ctl_ha_msg_scsi::tag_num, ctl_ha_msg_task::tag_num, ctl_scsiio::tag_type, ctl_taskio::tag_type, ctl_ha_msg_scsi::tag_type, ctl_ha_msg_task::tag_type, ctl_ha_msg::task, ctl_taskio::task_action, and ctl_ha_msg_task::task_action.
Referenced by ctl_ha_init().
|
static |
Definition at line 1061 of file ctl.c.
References ctl_alloc_io(), ctl_enqueue_isc(), ctl_est_ua_all(), ctl_softc::ctl_lock, CTL_LUN_PEER_SC_PRIMARY, CTL_MAX_INIT_PER_PORT, CTL_MSG_FAILOVER, CTL_UA_ASYM_ACC_CHANGE, ctl_zero_io(), ctl_lun::flags, ctl_wwpn_iid::in_use, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::msg_type, ctl_wwpn_iid::name, ctl_io_hdr::nexus, ctl_softc::othersc_pool, ctl_softc::port_max, ctl_softc::port_min, ctl_port::status, ctl_nexus::targ_mapped_lun, ctl_port::targ_port, and ctl_port::wwpn_iid.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1031 of file ctl.c.
References CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_HA_VERSION, ctl_isc_announce_iid(), ctl_isc_announce_lun(), ctl_isc_announce_port(), CTL_MAX_INIT_PER_PORT, ctl_max_luns, ctl_max_ports, CTL_MSG_LOGIN, ctl_ha_msg_login::ha_id, ctl_softc::ha_id, ctl_ha_msg_login::ha_mode, ctl_softc::ha_mode, ctl_ha_msg::login, ctl_ha_msg::lun, ctl_lun::lun, ctl_ha_msg_login::max_init_per_port, ctl_ha_msg_login::max_luns, ctl_ha_msg_login::max_ports, ctl_ha_msg_login::msg_type, ctl_ha_msg::port, and ctl_ha_msg_login::version.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 814 of file ctl.c.
References ctl_enqueue_isc(), CTL_MSG_FINISH_IO, ctl_ha_msg::hdr, ctl_scsiio::io_hdr, ctl_io_hdr::msg_type, ctl_io::scsiio, and ctl_ha_msg_hdr::serializing_sc.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 791 of file ctl.c.
References ctl_enqueue_isc(), CTL_FLAG_IO_ACTIVE, CTL_MSG_FINISH_IO, ctl_io_hdr::flags, ctl_ha_msg::hdr, ctl_scsiio::io_hdr, ctl_io_hdr::msg_type, ctl_ha_msg_hdr::original_sc, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_io_hdr::status, and ctl_ha_msg_hdr::status.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1355 of file ctl.c.
References CTL_HA_CHAN_CTL, ctl_ha_msg_abort(), ctl_i_t_nexus_loss(), ctl_softc::ctl_ports, CTL_UA_POWERON, ctl_ha_msg_iid::data, ctl_ha_msg::hdr, ctl_ha_msg::iid, ctl_wwpn_iid::in_use, ctl_ha_msg_iid::in_use, ctl_nexus::initid, ctl_wwpn_iid::name, ctl_ha_msg_iid::name_len, ctl_ha_msg_hdr::nexus, ctl_nexus::targ_port, ctl_wwpn_iid::wwpn, ctl_ha_msg_iid::wwpn, and ctl_port::wwpn_iid.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1395 of file ctl.c.
References CTL_HA_CHAN_CTL, ctl_ha_msg_abort(), CTL_HA_VERSION, CTL_MAX_INIT_PER_PORT, ctl_max_luns, ctl_max_ports, ctl_ha_msg_login::ha_id, ctl_softc::ha_id, ctl_ha_msg_login::ha_mode, ctl_softc::ha_mode, ctl_ha_msg::login, ctl_ha_msg_login::max_init_per_port, ctl_ha_msg_login::max_luns, ctl_ha_msg_login::max_ports, and ctl_ha_msg_login::version.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1139 of file ctl.c.
References ctl_alloc_prkey(), ctl_clr_prkey(), CTL_DEBUG_PRINT, ctl_est_ua_all(), CTL_HA_CHAN_CTL, ctl_ha_msg_abort(), ctl_isc_announce_lun(), ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_LUN_PEER_SC_PRIMARY, CTL_LUN_PRIMARY_SC, ctl_softc::ctl_luns, CTL_MAX_INITIATORS, ctl_max_luns, ctl_set_prkey(), CTL_UA_ASYM_ACC_CHANGE, ctl_ha_msg_lun::data, ctl_devid::data, ctl_ha_msg_lun::flags, ctl_lun::flags, ctl_ha_msg::hdr, ctl_devid::len, ctl_ha_msg::lun, ctl_lun::lun, ctl_lun::lun_devid, ctl_ha_msg_lun::lun_devid_len, ctl_lun::lun_lock, ctl_ha_msg_hdr::nexus, ctl_ha_msg_lun::pr_generation, ctl_lun::pr_generation, ctl_ha_msg_lun_pr_key::pr_key, ctl_ha_msg_lun::pr_key_count, ctl_lun::pr_key_count, ctl_ha_msg_lun::pr_res_idx, ctl_lun::pr_res_idx, ctl_ha_msg_lun::pr_res_type, ctl_lun::pr_res_type, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1432 of file ctl.c.
References ctl_est_ua_all(), ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_abort(), ctl_softc::ctl_lock, CTL_LUN_DISABLED, ctl_softc::ctl_luns, ctl_max_luns, CTL_NUM_MODE_PAGES, CTL_UA_MODE_CHANGE, ctl_ha_msg_mode::data, ctl_ha_msg::hdr, ctl_lun::lun, ctl_ha_msg::mode, ctl_ha_msg_hdr::nexus, ctl_ha_msg_mode::page_code, ctl_ha_msg_mode::page_len, SMPH_PC_MASK, ctl_ha_msg_mode::subpage, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1225 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_est_ua_all(), CTL_HA_CHAN_CTL, ctl_ha_datamove(), ctl_ha_done(), ctl_ha_msg_abort(), ctl_softc::ctl_lock, ctl_lun_map_to_port(), ctl_port_register(), ctl_softc::ctl_ports, CTL_UA_INQ_CHANGE, ctl_ha_msg_port::data, ctl_devid::data, ctl_port::fe_datamove, ctl_port::fe_done, ctl_port::frontend, ha_frontend, ctl_ha_msg::hdr, ctl_port::init_devid, ctl_ha_msg_port::init_devid_len, ctl_devid::len, ctl_lun::lun, ctl_port::lun_map, ctl_ha_msg_port::lun_map_len, ctl_port::lun_map_size, ctl_ha_msg_port::name_len, ctl_ha_msg_hdr::nexus, ctl_port::physical_port, ctl_ha_msg_port::physical_port, ctl_ha_msg::port, ctl_port::port_devid, ctl_ha_msg_port::port_devid_len, ctl_port::port_name, ctl_port::port_type, ctl_ha_msg_port::port_type, ctl_port::status, ctl_ha_msg_port::status, ctl_port::targ_port, ctl_nexus::targ_port, ctl_port::target_devid, ctl_ha_msg_port::target_devid_len, ctl_port::virtual_port, and ctl_ha_msg_port::virtual_port.
Referenced by ctl_isc_event_handler().
|
static |
Definition at line 1101 of file ctl.c.
References ctl_clr_ua(), ctl_clr_ua_all(), ctl_est_ua(), ctl_est_ua_all(), ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_abort(), ctl_softc::ctl_lock, ctl_softc::ctl_luns, ctl_max_luns, CTL_UA_THIN_PROV_THRES, ctl_ha_msg::hdr, ctl_lun::lun, ctl_ha_msg_hdr::nexus, ctl_nexus::targ_mapped_lun, ctl_ha_msg::ua, ctl_ha_msg_ua::ua_all, ctl_ha_msg_ua::ua_info, ctl_ha_msg_ua::ua_set, and ctl_ha_msg_ua::ua_type.
Referenced by ctl_isc_event_handler().
int ctl_lbp_log_sense_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
int | pc | ||
) |
Definition at line 6764 of file ctl.c.
References ctl_lun::backend, ctl_lun::be_lun, CTL_LBP_EXPONENT, CTL_LUN, ctl_lun::lun, ctl_backend_driver::lun_attr, ctl_page_index::page_data, ctl_page_index::page_len, scsi_log_param_header::param_code, scsi_log_param_header::param_control, scsi_log_param_header::param_len, scsi_ulto2b(), scsi_ulto4b(), SLP_LBIN, and SLP_LP.
int ctl_log_sense | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 6906 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_NUM_LOG_PAGES, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), scsi_log_header::datalen, ctl_io_hdr::flags, ctl_log_pages::index, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_log_sense::length, ctl_lun::log_pages, ctl_lun::lun, scsi_log_sense::page, scsi_log_header::page, ctl_page_index::page_code, ctl_page_index::page_data, ctl_page_index::page_len, scsi_2btoul(), scsi_ulto2b(), ctl_page_index::sense_handler, SL_DS, SL_PAGE_CODE, SL_SPF, SLS_LOGICAL_BLOCK_PROVISIONING, SLS_PAGE_CODE, SLS_PAGE_CTRL_MASK, ctl_page_index::subpage, scsi_log_sense::subpage, and scsi_log_header::subpage.
void ctl_lun_capacity_changed | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 5073 of file ctl.c.
References ctl_lun::be_lun, ctl_est_ua_all(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), ctl_be_lun::ctl_lun, CTL_MSG_UA, CTL_UA_CAPACITY_CHANGE, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_modify(), and ctl_be_block_modify().
int ctl_lun_ejected | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 5004 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::ctl_lun, CTL_LUN_EJECTED, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_config_write(), and ctl_be_block_config_write().
int ctl_lun_has_media | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 4976 of file ctl.c.
References ctl_lun::be_lun, ctl_est_ua_all(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), ctl_be_lun::ctl_lun, CTL_LUN_EJECTED, CTL_LUN_NO_MEDIA, CTL_LUN_REMOVABLE, CTL_MSG_UA, CTL_UA_MEDIUM_CHANGE, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_config_write(), ctl_be_block_config_write(), and ctl_be_block_modify().
int ctl_lun_map_deinit | ( | struct ctl_port * | port | ) |
Definition at line 3659 of file ctl.c.
References ctl_isc_announce_port(), CTL_PORT_STATUS_ONLINE, ctl_port::ctl_softc, ctl_lun::lun, ctl_port::lun_enable, ctl_port::lun_map, ctl_port::lun_map_size, ctl_port::status, and ctl_port::targ_lun_arg.
Referenced by ctl_ioctl(), and ctl_port_deregister().
uint32_t ctl_lun_map_from_port | ( | struct ctl_port * | port, |
uint32_t | lun_id | ||
) |
Definition at line 3720 of file ctl.c.
References ctl_port::lun_map, and ctl_port::lun_map_size.
Referenced by ctl_ioctl(), ctl_port_offline(), ctl_port_online(), ctl_queue(), ctl_queue_sense(), ctl_report_luns(), and ctl_run().
int ctl_lun_map_init | ( | struct ctl_port * | port | ) |
Definition at line 3630 of file ctl.c.
References ctl_isc_announce_port(), ctl_lun_map_size, CTL_PORT_STATUS_ONLINE, ctl_port::ctl_softc, ctl_lun::lun, ctl_port::lun_disable, ctl_port::lun_map, ctl_port::lun_map_size, ctl_port::status, and ctl_port::targ_lun_arg.
Referenced by ctl_ioctl(), and ctl_lun_map_set().
int ctl_lun_map_set | ( | struct ctl_port * | port, |
uint32_t | plun, | ||
uint32_t | glun | ||
) |
Definition at line 3680 of file ctl.c.
References ctl_isc_announce_port(), ctl_lun_map_init(), CTL_PORT_STATUS_ONLINE, ctl_port::lun_enable, ctl_port::lun_map, ctl_port::lun_map_size, ctl_port::status, and ctl_port::targ_lun_arg.
Referenced by ctl_ioctl().
uint32_t ctl_lun_map_to_port | ( | struct ctl_port * | port, |
uint32_t | lun_id | ||
) |
Definition at line 3733 of file ctl.c.
References ctl_port::lun_map, and ctl_port::lun_map_size.
Referenced by ctl_inquiry_evpd_scsi_ports(), ctl_ioctl(), ctl_isc_port_sync(), ctl_port_offline(), ctl_port_online(), ctl_report_tagret_port_groups(), ctl_target_reset(), and tpcl_resolve().
int ctl_lun_map_unset | ( | struct ctl_port * | port, |
uint32_t | plun | ||
) |
Definition at line 3703 of file ctl.c.
References ctl_isc_announce_port(), CTL_PORT_STATUS_ONLINE, ctl_port::lun_disable, ctl_port::lun_map, ctl_port::lun_map_size, ctl_port::status, and ctl_port::targ_lun_arg.
Referenced by ctl_ioctl().
int ctl_lun_no_media | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 4965 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::ctl_lun, CTL_LUN_NO_MEDIA, and ctl_lun::lun.
Referenced by ctl_be_block_config_write(), ctl_be_block_modify(), and ctl_be_block_rm().
int ctl_lun_primary | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 5015 of file ctl.c.
References ctl_lun::be_lun, ctl_est_ua_all(), ctl_isc_announce_lun(), ctl_be_lun::ctl_lun, CTL_LUN_PRIMARY_SC, CTL_UA_ASYM_ACC_CHANGE, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_modify(), and ctl_be_block_modify().
|
static |
Definition at line 11905 of file ctl.c.
References ctl_do_lun_reset(), CTL_FLAG_FROM_OTHER_SC, ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), ctl_softc::ctl_lock, ctl_softc::ctl_luns, ctl_max_luns, CTL_MSG_MANAGE_TASKS, CTL_SOFTC, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_LUN_DOES_NOT_EXIST, CTL_TASK_LUN_RESET, CTL_UA_LUN_RESET, ctl_io_hdr::flags, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_lun::lun, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_ha_msg_hdr::serializing_sc, ctl_nexus::targ_mapped_lun, ctl_ha_msg::task, ctl_ha_msg_task::task_action, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
int ctl_lun_secondary | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 5028 of file ctl.c.
References ctl_lun::be_lun, ctl_est_ua_all(), ctl_isc_announce_lun(), ctl_be_lun::ctl_lun, CTL_UA_ASYM_ACC_CHANGE, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_modify(), and ctl_be_block_modify().
int ctl_mechanism_status | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 10631 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_mechanism_status_header::lba, scsi_mechanism_status::length, scsi_2btoul(), scsi_ulto2b(), scsi_ulto3b(), scsi_mechanism_status_header::slots_length, scsi_mechanism_status_header::slots_num, scsi_mechanism_status_header::state1, and scsi_mechanism_status_header::state2.
int ctl_mode_select | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 6251 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_mode_header_6::blk_desc_len, scsi_mode_header_10::blk_desc_len, scsi_mode_select_6::byte2, scsi_mode_select_10::byte2, ctl_priv::bytes, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), ctl_do_mode_select(), ctl_done(), ctl_est_ua_all(), CTL_FLAG_ALLOCATED, CTL_FLAG_IO_CONT, ctl_get_initindex(), ctl_init_page_index(), ctl_isc_announce_mode(), CTL_LUN, CTL_NUM_MODE_PAGES, CTL_PRIV_MODEPAGE, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_set_param_len_error(), ctl_set_success(), CTL_UA_MODE_CHANGE, ctl_io_hdr::flags, ctl_modepage_info::header, ctl_mode_pages::index, ctl_scsiio::io_cont, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_modepage_header::len_left, ctl_modepage_header::len_used, scsi_mode_select_6::length, scsi_mode_select_10::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_lun::mode_pages, MODE_SELECT_10, MODE_SELECT_6, ctl_io_hdr::nexus, ctl_page_index::page_code, scsi_2btoul(), SMPH_PC_MASK, SMS_RTD, and ctl_page_index::subpage.
int ctl_mode_sense | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 6395 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, scsi_mode_hdr_6::block_descr_len, scsi_mode_hdr_10::block_descr_len, scsi_mode_block_descr::block_len, scsi_mode_block_descr_dshort::block_len, scsi_mode_block_descr_dlong::block_len, ctl_be_lun::blocksize, scsi_mode_sense_6::byte2, scsi_mode_sense_10::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_LUN_FLAG_READONLY, CTL_NUM_MODE_PAGES, CTL_PAGE_FLAG_CDROM, CTL_PAGE_FLAG_DIRECT, CTL_PAGE_FLAG_PROC, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_set_success(), scsi_mode_hdr_6::datalen, scsi_mode_hdr_10::datalen, scsi_mode_hdr_6::dev_specific, scsi_mode_hdr_10::dev_specific, ctl_be_lun::flags, ctl_io_hdr::flags, scsi_mode_hdr_10::flags, ctl_mode_pages::index, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_mode_sense_6::length, scsi_mode_sense_10::length, ctl_lun::lun, ctl_be_lun::lun_type, ctl_be_lun::maxlba, ctl_lun::mode_pages, MODE_SENSE_10, MODE_SENSE_6, scsi_mode_block_descr_dshort::num_blocks, scsi_mode_block_descr_dlong::num_blocks, scsi_mode_sense_6::page, scsi_mode_sense_10::page, ctl_page_index::page_code, ctl_page_index::page_data, ctl_page_index::page_flags, ctl_page_index::page_len, SCP_SWP, scsi_2btoul(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto3b(), scsi_ulto4b(), ctl_page_index::sense_handler, SMH_LONGLBA, SMPH_PC_MASK, SMS10_LLBAA, SMS_ALL_PAGES_PAGE, SMS_DBD, SMS_PAGE_CODE, SMS_PAGE_CTRL_MASK, SMS_SUBPAGE_ALL, SMS_SUBPAGE_PAGE_0, ctl_page_index::subpage, scsi_mode_sense_6::subpage, scsi_mode_sense_10::subpage, T_CDROM, T_DIRECT, and T_PROCESSOR.
|
static |
Definition at line 2111 of file ctl.c.
References ctl_init(), and ctl_shutdown().
|
static |
int ctl_persistent_reserve_in | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7690 of file ctl.c.
References scsi_per_res_in::action, scsi_per_res_in_full_desc::additional_length, ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_create_iid(), ctl_datamove(), CTL_DEBUG_PRINT, CTL_FLAG_ALLOCATED, ctl_get_prkey(), CTL_LUN, CTL_LUN_PR_RESERVED, CTL_MAX_INIT_PER_PORT, CTL_MAX_INITIATORS, ctl_softc::ctl_ports, CTL_PR_ALL_REGISTRANTS, CTL_RETVAL_COMPLETE, ctl_set_success(), CTL_SOFTC, scsi_per_res_in_rsrv::data, scsi_per_res_in_full::desc, ctl_io_hdr::flags, ctl_lun::flags, scsi_per_res_in_full_desc::flags, scsi_per_res_cap::flags1, scsi_per_res_cap::flags2, scsi_per_res_in_header::generation, scsi_per_res_in_keys::header, scsi_per_res_in_rsrv::header, scsi_per_res_in_full::header, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_per_res_key::key, scsi_per_res_in_keys::keys, scsi_per_res_in::length, scsi_per_res_cap::length, scsi_per_res_in_header::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_lun::pr_generation, ctl_lun::pr_key_count, ctl_lun::pr_res_idx, ctl_lun::pr_res_type, scsi_per_res_in_full_desc::rel_trgt_port_id, scsi_per_res_in_full_desc::res_key, scsi_per_res_in_rsrv_data::reservation, scsi_per_res_in_rsrv_data::scopetype, scsi_per_res_in_full_desc::scopetype, scsi_2btoul(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), SPRI_ALLOW_5, SPRI_CRH, SPRI_FULL_R_HOLDER, SPRI_RC, SPRI_RK, SPRI_RR, SPRI_RS, SPRI_TM_EX_AC, SPRI_TM_EX_AC_AR, SPRI_TM_EX_AC_RO, SPRI_TM_WR_EX, SPRI_TM_WR_EX_AR, SPRI_TM_WR_EX_RO, SPRI_TMV, scsi_per_res_in_full_desc::transport_id, and scsi_per_res_cap::type_mask.
int ctl_persistent_reserve_out | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 8254 of file ctl.c.
References ctl_pr_info::action, scsi_per_res_out::action, ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_alloc_prkey(), ctl_clr_prkey(), ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), ctl_est_ua(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), ctl_get_prkey(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_LUN, CTL_LUN_PR_RESERVED, CTL_MAX_INITIATORS, CTL_MSG_PERS_ACTION, CTL_PR_ALL_REGISTRANTS, CTL_PR_CLEAR, CTL_PR_NO_RESERVATION, CTL_PR_REG_KEY, CTL_PR_RELEASE, CTL_PR_RESERVE, CTL_PR_UNREG_KEY, ctl_pro_preempt(), CTL_RETVAL_COMPLETE, ctl_set_illegal_pr_release(), ctl_set_invalid_field(), ctl_set_prkey(), ctl_set_reservation_conflict(), ctl_set_success(), CTL_SOFTC, CTL_UA_REG_PREEMPT, CTL_UA_RES_RELEASE, ctl_io_hdr::flags, ctl_lun::flags, scsi_per_res_out_parms::flags, ctl_ha_msg::hdr, ctl_softc::init_min, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_per_res_key::key, scsi_per_res_out::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg::pr, ctl_lun::pr_generation, ctl_ha_msg_pr::pr_info, ctl_lun::pr_key_count, ctl_lun::pr_res_idx, ctl_lun::pr_res_type, scsi_per_res_out_parms::res_key, ctl_pr_info::res_type, ctl_pr_info::residx, ctl_pr_info::sa_res_key, scsi_per_res_out::scope_type, SCP_NUAR, scsi_4btoul(), scsi_8btou64(), scsi_per_res_out_parms::serv_act_res_key, SPR_ALL_TG_PT, SPR_APTPL, SPR_LU_SCOPE, SPR_SCOPE_MASK, SPR_SPEC_I_PT, SPR_TYPE_EX_AC, SPR_TYPE_EX_AC_AR, SPR_TYPE_EX_AC_RO, SPR_TYPE_MASK, SPR_TYPE_WR_EX, SPR_TYPE_WR_EX_AR, SPR_TYPE_WR_EX_RO, SPRO_ACTION_MASK, SPRO_CLEAR, SPRO_PRE_ABO, SPRO_PREEMPT, SPRO_REG_IGNO, SPRO_REGISTER, SPRO_RELEASE, and SPRO_RESERVE.
int ctl_pool_create | ( | struct ctl_softc * | ctl_softc, |
const char * | pool_name, | ||
uint32_t | total_ctl_io, | ||
void ** | npool | ||
) |
Definition at line 3923 of file ctl.c.
References ctl_io_pool::ctl_softc, ctl_softc::io_zone, ctl_io_pool::name, and ctl_io_pool::zone.
Referenced by ctl_ha_init(), and ctl_port_register().
void ctl_pool_free | ( | struct ctl_io_pool * | pool | ) |
Definition at line 3948 of file ctl.c.
References ctl_io_pool::zone.
Referenced by ctl_ha_init(), ctl_ha_shutdown(), and ctl_port_deregister().
int ctl_prevent_allow | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5379 of file ctl.c.
References ctl_lun::backend, ctl_scsiio::cdb, ctl_backend_driver::config_write, ctl_clear_mask(), CTL_DEBUG_PRINT, ctl_done(), ctl_get_initindex(), ctl_is_set(), CTL_LUN, CTL_LUN_REMOVABLE, CTL_RETVAL_COMPLETE, ctl_set_invalid_opcode(), ctl_set_mask(), ctl_lun::flags, scsi_prevent::how, ctl_scsiio::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, PR_PREVENT, ctl_lun::prevent, and ctl_lun::prevent_count.
|
static |
Definition at line 7930 of file ctl.c.
References ctl_pr_info::action, ctl_clr_prkey(), ctl_done(), ctl_est_ua(), ctl_get_prkey(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_LUN_PR_RESERVED, CTL_MAX_INITIATORS, CTL_MSG_PERS_ACTION, CTL_PR_ALL_REGISTRANTS, CTL_PR_PREEMPT, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_reservation_conflict(), CTL_UA_REG_PREEMPT, CTL_UA_RES_RELEASE, ctl_ha_msg_lun::flags, ctl_ha_msg::hdr, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_ptr, ctl_ha_msg::lun, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg::pr, ctl_ha_msg_lun::pr_generation, ctl_ha_msg_pr::pr_info, ctl_ha_msg_lun::pr_key_count, ctl_ha_msg_lun::pr_res_idx, ctl_ha_msg_lun::pr_res_type, ctl_pr_info::res_type, ctl_pr_info::residx, ctl_pr_info::sa_res_key, scsi_per_res_out::scope_type, scsi_per_res_out_parms::serv_act_res_key, SPR_LU_SCOPE, SPR_SCOPE_MASK, SPR_TYPE_EX_AC_AR, SPR_TYPE_EX_AC_RO, SPR_TYPE_WR_EX_AR, and SPR_TYPE_WR_EX_RO.
Referenced by ctl_persistent_reserve_out().
|
static |
Definition at line 8187 of file ctl.c.
References ctl_clr_prkey(), ctl_est_ua(), ctl_get_prkey(), CTL_MAX_INITIATORS, CTL_PR_ALL_REGISTRANTS, CTL_PR_NO_RESERVATION, CTL_UA_REG_PREEMPT, CTL_UA_RES_RELEASE, ctl_ha_msg::lun, ctl_ha_msg::pr, ctl_ha_msg_lun::pr_generation, ctl_ha_msg_pr::pr_info, ctl_ha_msg_lun::pr_key_count, ctl_ha_msg_lun::pr_res_idx, ctl_ha_msg_lun::pr_res_type, ctl_pr_info::res_type, ctl_pr_info::residx, ctl_pr_info::sa_res_key, scsi_8btou64(), SPR_TYPE_EX_AC_AR, SPR_TYPE_EX_AC_RO, SPR_TYPE_WR_EX_AR, and SPR_TYPE_WR_EX_RO.
Referenced by ctl_hndl_per_res_out_on_other_sc().
|
static |
Definition at line 13002 of file ctl.c.
References ctl_io_stats::bytes, CTL_CMD_FLAG_NO_SENSE, ctl_debug, CTL_DEBUG_INFO, CTL_DEBUG_PRINT, CTL_FLAG_ABORT, CTL_FLAG_DATA_IN, CTL_FLAG_DATA_MASK, CTL_FLAG_DATA_OUT, CTL_FLAG_SENT_2OTHER_SC, CTL_FLAG_STATUS_SENT, ctl_free_lun(), ctl_get_cmd_entry(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), ctl_inject_error(), ctl_io_error_print(), CTL_IO_SCSI, CTL_IO_TASK, CTL_LUN, CTL_LUN_INVALID, CTL_MSG_FINISH_IO, CTL_PORT, ctl_scsi_command_string(), ctl_scsi_path_string(), ctl_set_sense(), ctl_set_task_aborted(), CTL_SOFTC, CTL_STATS_NO_IO, CTL_STATS_READ, CTL_STATS_WRITE, CTL_STATUS_MASK, CTL_SUCCESS, ctl_try_unblock_others(), ctl_io_hdr::dma_bt, ctl_io_stats::dma_time, ctl_io_stats::dmas, ctl_io_hdr::flags, ctl_cmd_entry::flags, ctl_lun::flags, ctl_softc::ha_mode, ctl_ha_msg::hdr, ctl_lun::ie_asc, ctl_lun::ie_ascq, ctl_lun::ie_reported, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_scsiio::kern_total_len, ctl_lun::lun, ctl_lun::lun_lock, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_io_hdr::num_dmas, ctl_io_stats::operations, ctl_ha_msg::port, ctl_port::port_lock, ctl_scsiio::priority, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_io::scsiio, ctl_ha_msg_scsi::sense_data, ctl_ha_msg_hdr::serializing_sc, SIEP_MRIE_NO_SENSE, SIEP_MRIE_REC_COND, SIEP_MRIE_REC_UNCOND, SMS_RWER_PER, SMS_VER_PER, SSD_ELEM_NONE, SSD_KEY_NO_SENSE, SSD_KEY_RECOVERED_ERROR, ctl_io_hdr::start_bt, ctl_io_hdr::start_time, ctl_port::stats, ctl_lun::stats, ctl_io_hdr::status, ctl_scsiio::tag_num, ctl_taskio::tag_num, ctl_scsiio::tag_type, ctl_taskio::tag_type, ctl_nexus::targ_mapped_lun, ctl_taskio::task_action, ctl_io::taskio, and ctl_io_stats::time.
Referenced by ctl_work_thread().
|
static |
Definition at line 12196 of file ctl.c.
References ctl_build_qae(), ctl_get_initindex(), ctl_softc::ctl_lock, ctl_softc::ctl_luns, ctl_max_luns, CTL_SOFTC, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_FUNCTION_SUCCEEDED, CTL_TASK_LUN_DOES_NOT_EXIST, CTL_UA_NONE, ctl_io::io_hdr, ctl_lun::lun, ctl_io_hdr::nexus, ctl_nexus::targ_mapped_lun, ctl_taskio::task_resp, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
|
static |
Definition at line 12157 of file ctl.c.
References CTL_FLAG_ABORT, ctl_softc::ctl_lock, ctl_softc::ctl_luns, ctl_max_luns, CTL_SOFTC, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_FUNCTION_SUCCEEDED, CTL_TASK_LUN_DOES_NOT_EXIST, ctl_io_hdr::flags, ctl_nexus::initid, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, ctl_io::scsiio, ctl_scsiio::tag_num, ctl_taskio::tag_num, ctl_nexus::targ_mapped_lun, ctl_nexus::targ_port, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
int ctl_queue | ( | union ctl_io * | io | ) |
Definition at line 13270 of file ctl.c.
References ctl_scsiio::cdb, ctl_debug, CTL_DEBUG_CDB, CTL_DEBUG_PRINT, ctl_enqueue_incoming(), ctl_io_print(), CTL_IO_SCSI, CTL_IO_TASK, ctl_lun_map_from_port(), CTL_PORT, CTL_RETVAL_COMPLETE, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_io_hdr::nexus, ctl_io::scsiio, ctl_io_hdr::start_bt, ctl_io_hdr::start_time, ctl_nexus::targ_lun, and ctl_nexus::targ_mapped_lun.
Referenced by cfcs_action(), ctlfedone(), and tpcl_queue().
int ctl_queue_sense | ( | union ctl_io * | io | ) |
Definition at line 13218 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_free_io(), ctl_get_initindex(), ctl_softc::ctl_lock, ctl_lun_map_from_port(), ctl_softc::ctl_luns, CTL_MAX_INIT_PER_PORT, ctl_max_luns, CTL_PORT, CTL_RETVAL_COMPLETE, CTL_SOFTC, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, ctl_lun::pending_sense, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_scsiio::sense_len, and ctl_nexus::targ_lun.
Referenced by ctlfedone().
int ctl_read_buffer | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5564 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_read_buffer::byte2, scsi_read_buffer_16::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_set_success(), CTL_WRITE_BUFFER_SIZE, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_read_buffer::length, scsi_read_buffer_16::length, ctl_lun::lun, scsi_read_buffer::offset, scsi_read_buffer_16::offset, READ_BUFFER, READ_BUFFER_16, RWB_MODE, RWB_MODE_DESCR, RWB_MODE_ECHO_DESCR, scsi_3btoul(), scsi_4btoul(), scsi_8btou64(), scsi_ulto3b(), and ctl_lun::write_buffer.
int ctl_read_capacity | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 6983 of file ctl.c.
References scsi_read_capacity::addr, scsi_read_capacity_data::addr, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_be_lun::blocksize, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_read_capacity_data::length, ctl_lun::lun, ctl_be_lun::maxlba, scsi_read_capacity::pmi, scsi_4btoul(), scsi_ulto4b(), and SRC_PMI.
int ctl_read_capacity_16 | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7037 of file ctl.c.
References scsi_read_capacity_16::addr, scsi_read_capacity_data_long::addr, scsi_read_capacity_16::alloc_len, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_be_lun::blocksize, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_LUN_FLAG_UNMAP, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), ctl_be_lun::flags, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_read_capacity_data_long::lalba_lbp, scsi_read_capacity_data_long::length, ctl_lun::lun, ctl_be_lun::maxlba, ctl_be_lun::pblockexp, ctl_be_lun::pblockoff, scsi_read_capacity_data_long::prot_lbppbe, scsi_read_capacity_16::reladr, scsi_4btoul(), scsi_8btou64(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), SRC16_LALBA_A, SRC16_LBPME, SRC16_LBPPBE, SRC16_LBPRZ, and SRC16_PMI.
int ctl_read_defect | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7137 of file ctl.c.
References scsi_read_defect_data_10::alloc_length, scsi_read_defect_data_12::alloc_length, ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_io_hdr::flags, scsi_read_defect_data_10::format, scsi_read_defect_data_12::format, scsi_read_defect_data_hdr_10::format, scsi_read_defect_data_hdr_12::format, scsi_read_defect_data_hdr_12::generation, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_read_defect_data_hdr_10::length, scsi_read_defect_data_hdr_12::length, READ_DEFECT_DATA_10, scsi_2btoul(), scsi_4btoul(), scsi_ulto2b(), and scsi_ulto4b().
int ctl_read_toc | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 10673 of file ctl.c.
References scsi_read_toc_type01_descr::addr_ctl, ctl_lun::be_lun, ctl_scsiio::be_move_done, scsi_read_toc::byte2, CD_MSF, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_ultomsf(), scsi_read_toc::data_len, scsi_read_toc_hdr::data_length, scsi_read_toc_hdr::first, ctl_io_hdr::flags, scsi_read_toc::format, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_read_toc_hdr::last, ctl_lun::lun, ctl_be_lun::maxlba, scsi_2btoul(), scsi_ulto2b(), scsi_ulto4b(), scsi_read_toc_type01_descr::track_number, and scsi_read_toc_type01_descr::track_start.
int ctl_read_write | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 8756 of file ctl.c.
References scsi_rw_6::addr, scsi_rw_10::addr, scsi_rw_12::addr, scsi_write_verify_10::addr, scsi_write_verify_12::addr, scsi_rw_16::addr, scsi_write_atomic_16::addr, scsi_write_verify_16::addr, ctl_be_lun::atomicblock, ctl_lun::backend, ctl_lun::be_lun, ctl_be_lun::blocksize, scsi_rw_10::byte2, scsi_rw_12::byte2, scsi_rw_16::byte2, scsi_write_atomic_16::byte2, scsi_write_verify_10::byte2, scsi_write_verify_12::byte2, scsi_write_verify_16::byte2, ctl_scsiio::cdb, CTL_DEBUG_PRINT, ctl_done(), CTL_LLF_DPO, CTL_LLF_FUA, CTL_LLF_READ, CTL_LLF_WRITE, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_set_lba_out_of_range(), ctl_set_success(), ctl_backend_driver::data_submit, ctl_lba_len_flags::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_total_len, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, scsi_rw_6::length, scsi_rw_10::length, scsi_write_atomic_16::length, scsi_write_verify_10::length, scsi_rw_12::length, scsi_rw_16::length, scsi_write_verify_12::length, scsi_write_verify_16::length, ctl_lun::lun, ctl_be_lun::maxlba, READ_10, READ_12, READ_16, READ_6, SCP_RCD, SCP_WCE, scsi_2btoul(), scsi_3btoul(), scsi_4btoul(), scsi_8btou64(), SRW10_DPO, SRW10_FUA, SRW12_DPO, SRW12_FUA, SWV_DPO, WRITE_10, WRITE_12, WRITE_16, WRITE_6, WRITE_ATOMIC_16, WRITE_VERIFY_10, WRITE_VERIFY_12, and WRITE_VERIFY_16.
int ctl_remove_initiator | ( | struct ctl_port * | port, |
int | iid | ||
) |
Definition at line 2145 of file ctl.c.
References ctl_i_t_nexus_loss(), ctl_isc_announce_iid(), ctl_softc::ctl_lock, CTL_MAX_INIT_PER_PORT, ctl_port::ctl_softc, CTL_UA_POWERON, ctl_wwpn_iid::in_use, ctl_wwpn_iid::last_use, and ctl_port::wwpn_iid.
Referenced by cfiscsi_session_unregister_initiator(), and ctlfeasync().
int ctl_remove_lun | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 5047 of file ctl.c.
References ctl_lun::be_lun, ctl_disable_lun(), ctl_free_lun(), ctl_be_lun::ctl_lun, CTL_LUN_INVALID, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_rm(), ctl_backend_ramdisk_shutdown(), ctl_be_block_rm(), and ctl_be_block_shutdown().
int ctl_report_ident_info | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7192 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), ctl_io_hdr::flags, hex2bin(), ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_report_ident_info_data::length, scsi_report_ident_info_descr::length, scsi_report_ident_info::length, ctl_lun::lun, ctl_be_lun::options, RII_IIS, RII_LUII, RII_LUTII, scsi_4btoul(), scsi_ulto2b(), scsi_report_ident_info::type, and scsi_report_ident_info_descr::type.
int ctl_report_luns | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 9156 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_clr_ua(), ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), ctl_encode_lun(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), ctl_softc::ctl_lock, CTL_LUN, ctl_lun_map_from_port(), ctl_softc::ctl_luns, ctl_max_luns, CTL_PORT, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), CTL_SOFTC, CTL_UA_LUN_CHANGE, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_report_luns::length, scsi_report_luns_data::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_port::lun_map, ctl_port::lun_map_size, scsi_report_luns_lundata::lundata, scsi_report_luns_data::luns, ctl_io_hdr::nexus, RPL_REPORT_ADMIN, RPL_REPORT_ALL, RPL_REPORT_CONGLOM, RPL_REPORT_DEFAULT, RPL_REPORT_NONSUBSID, RPL_REPORT_WELLKNOWN, scsi_4btoul(), scsi_ulto4b(), and scsi_report_luns::select_report.
int ctl_report_supported_opcodes | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7443 of file ctl.c.
References ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_scsiio::cdb, scsi_report_supported_opcodes_descr::cdb_length, scsi_report_supported_opcodes_one::cdb_length, scsi_report_supported_opcodes_one::cdb_usage, ctl_cmd_applicable(), CTL_CMD_FLAG_SA5, ctl_cmd_table, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), scsi_report_supported_opcodes_all::descr, ctl_cmd_entry::execute, ctl_io_hdr::flags, ctl_cmd_entry::flags, scsi_report_supported_opcodes_descr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_cmd_entry::length, scsi_report_supported_opcodes::length, scsi_report_supported_opcodes_all::length, ctl_lun::lun, ctl_be_lun::lun_type, scsi_report_supported_opcodes::opcode, scsi_report_supported_opcodes_descr::opcode, scsi_report_supported_opcodes::options, scsi_report_supported_opcodes::requested_opcode, scsi_report_supported_opcodes::requested_service_action, RSO_OPTIONS_ALL, RSO_OPTIONS_MASK, RSO_OPTIONS_OC, RSO_OPTIONS_OC_ASA, RSO_OPTIONS_OC_SA, RSO_SERVACTV, scsi_2btoul(), scsi_4btoul(), scsi_ulto2b(), scsi_ulto4b(), scsi_report_supported_opcodes::service_action, scsi_report_supported_opcodes_descr::service_action, scsi_report_supported_opcodes_one::support, and ctl_cmd_entry::usage.
int ctl_report_supported_tmf | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7611 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_report_supported_tmf_ext_data::byte1, scsi_report_supported_tmf_ext_data::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_report_supported_tmf::length, scsi_report_supported_tmf_ext_data::length, scsi_report_supported_tmf::options, RST_ATS, RST_ATSS, RST_CTSS, RST_ITNRS, RST_LURS, RST_QAES, RST_QTS, RST_QTSS, RST_REPD, RST_TRS, and scsi_4btoul().
int ctl_report_tagret_port_groups | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7274 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_maintenance_in::byte2, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_HA_LINK_OFFLINE, CTL_HA_LINK_UNKNOWN, CTL_HA_MODE_ACT_STBY, ctl_softc::ctl_lock, CTL_LUN, ctl_lun_map_to_port(), CTL_LUN_PEER_SC_PRIMARY, CTL_LUN_PRIMARY_SC, CTL_PORT_STATUS_HA_SHARED, CTL_PORT_STATUS_ONLINE, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), CTL_SOFTC, scsi_target_port_group_descriptor::descriptors, ctl_io_hdr::flags, ctl_lun::flags, scsi_target_group_data_extended::format_type, scsi_target_group_data::groups, scsi_target_group_data_extended::groups, ctl_softc::ha_link, ctl_softc::ha_mode, scsi_target_group_data_extended::implicit_transition_time, ctl_scsiio::io_hdr, ctl_softc::is_single, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_maintenance_in::length, scsi_target_group_data::length, scsi_target_group_data_extended::length, ctl_lun::lun, NUM_HA_SHELVES, ctl_softc::port_cnt, ctl_softc::port_min, scsi_target_port_group_descriptor::pref_state, scsi_4btoul(), scsi_ulto2b(), scsi_ulto4b(), ctl_port::status, scsi_target_port_group_descriptor::status, STG_PDF_EXTENDED, STG_PDF_LENGTH, STG_PDF_MASK, scsi_target_port_group_descriptor::support, ctl_port::targ_port, scsi_target_port_group_descriptor::target_port_count, scsi_target_port_group_descriptor::target_port_group, TPG_AN_SUP, TPG_AO_SUP, TPG_ASYMMETRIC_ACCESS_NONOPTIMIZED, TPG_ASYMMETRIC_ACCESS_OPTIMIZED, TPG_ASYMMETRIC_ACCESS_STANDBY, TPG_ASYMMETRIC_ACCESS_TRANSITIONING, TPG_ASYMMETRIC_ACCESS_UNAVAILABLE, TPG_IMPLICIT, TPG_S_SUP, TPG_T_SUP, and TPG_U_SUP.
int ctl_report_timestamp | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 7650 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, CTL_FLAG_ALLOCATED, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_report_timestamp_data::length, scsi_report_timestamp::length, scsi_report_timestamp_data::origin, RTS_ORIG_OUTSIDE, scsi_4btoul(), scsi_ulto2b(), scsi_ulto4b(), and scsi_report_timestamp_data::timestamp.
int ctl_request_sense | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 9300 of file ctl.c.
References ctl_scsiio::be_move_done, scsi_request_sense::byte2, ctl_scsiio::cdb, ctl_build_ua(), ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, CTL_FLAG_ALLOCATED, ctl_get_initindex(), CTL_HA_LINK_UNKNOWN, CTL_LUN, CTL_LUN_PRIMARY_SC, CTL_MAX_INIT_PER_PORT, CTL_RETVAL_COMPLETE, ctl_sense_to_desc(), ctl_sense_to_fixed(), ctl_set_sense_data(), ctl_set_success(), CTL_SOFTC, CTL_UA_NONE, scsi_sense_data::error_code, scsi_sense_data_fixed::error_code, ctl_io_hdr::flags, ctl_lun::flags, ctl_softc::ha_link, ctl_lun::ie_asc, ctl_lun::ie_ascq, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_request_sense::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, ctl_lun::pending_sense, scsi_sense_type(), SIEP_MRIE_NO, SRS_DESC, SSD_ELEM_NONE, SSD_FULL_SIZE, SSD_KEY_ILLEGAL_REQUEST, SSD_KEY_NO_SENSE, SSD_TYPE_DESC, and SSD_TYPE_FIXED.
int ctl_run | ( | union ctl_io * | io | ) |
Definition at line 13301 of file ctl.c.
References ctl_scsiio::cdb, ctl_debug, CTL_DEBUG_CDB, CTL_DEBUG_PRINT, ctl_io_print(), CTL_IO_SCSI, CTL_IO_TASK, ctl_lun_map_from_port(), CTL_PORT, CTL_RETVAL_COMPLETE, ctl_run_task(), ctl_scsiio_precheck(), ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_io_hdr::nexus, ctl_io::scsiio, ctl_io_hdr::start_bt, ctl_io_hdr::start_time, ctl_nexus::targ_lun, and ctl_nexus::targ_mapped_lun.
Referenced by cfi_submit_wait(), cfiscsi_pdu_handle_scsi_command(), cfiscsi_pdu_handle_task_request(), and cfiscsi_session_terminate_tasks().
|
static |
Definition at line 12224 of file ctl.c.
References ctl_abort_task(), ctl_abort_task_set(), CTL_DEBUG_PRINT, ctl_done(), CTL_ERROR, ctl_i_t_nexus_reset(), CTL_IO_TASK, ctl_lun_reset(), ctl_query_async_event(), ctl_query_task(), CTL_SUCCESS, ctl_target_reset(), CTL_TASK_ABORT_TASK, CTL_TASK_ABORT_TASK_SET, CTL_TASK_BUS_RESET, CTL_TASK_CLEAR_ACA, CTL_TASK_CLEAR_TASK_SET, CTL_TASK_FUNCTION_NOT_SUPPORTED, CTL_TASK_I_T_NEXUS_RESET, CTL_TASK_LUN_RESET, CTL_TASK_PORT_LOGIN, CTL_TASK_PORT_LOGOUT, CTL_TASK_QUERY_ASYNC_EVENT, CTL_TASK_QUERY_TASK, CTL_TASK_QUERY_TASK_SET, CTL_TASK_TARGET_RESET, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_io_hdr::status, ctl_taskio::task_action, ctl_taskio::task_resp, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_isc_event_handler(), ctl_run(), and ctl_work_thread().
int ctl_sap_log_sense_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
int | pc | ||
) |
Definition at line 6832 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::blocksize, ctl_io_stats::bytes, CTL_LUN, CTL_STATS_READ, CTL_STATS_WRITE, ctl_lun::lun, ctl_io_stats::operations, ctl_page_index::page_data, scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), SLP_IT, SLP_LBIN, SLP_SAP, SLP_TI, ctl_lun::stats, and ctl_io_stats::time.
int ctl_sbuf_printf_esc | ( | struct sbuf * | sb, |
char * | str, | ||
int | size | ||
) |
Definition at line 2528 of file ctl.c.
Referenced by ctl_ioctl().
int ctl_scsi_release | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5249 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_done(), ctl_get_initindex(), CTL_LUN, CTL_LUN_RESERVED, CTL_RETVAL_COMPLETE, ctl_set_success(), ctl_scsiio::io_hdr, ctl_lun::lun, and ctl_io_hdr::nexus.
int ctl_scsi_reserve | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5286 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_done(), ctl_get_initindex(), CTL_LUN, CTL_LUN_PR_RESERVED, CTL_LUN_RESERVED, CTL_RETVAL_COMPLETE, ctl_set_reservation_conflict(), ctl_set_success(), ctl_scsiio::io_hdr, ctl_lun::lun, and ctl_io_hdr::nexus.
|
static |
Definition at line 11779 of file ctl.c.
References ctl_scsiio::cdb, CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ABORT, ctl_get_cmd_entry(), CTL_RETVAL_COMPLETE, ctl_cmd_entry::execute, ctl_io_hdr::flags, and ctl_scsiio::io_hdr.
Referenced by ctl_config_move_done(), and ctl_work_thread().
|
static |
Definition at line 11286 of file ctl.c.
References ctl_lun::be_lun, CTL_CMD_FLAG_ALLOW_ON_PR_RESV, CTL_CMD_FLAG_ALLOW_ON_PR_WRESV, CTL_CMD_FLAG_ALLOW_ON_RESV, CTL_CMD_FLAG_OK_ON_NO_MEDIA, CTL_CMD_FLAG_OK_ON_STANDBY, CTL_CMD_FLAG_OK_ON_UNAVAIL, ctl_get_initindex(), ctl_get_prkey(), CTL_HA_LINK_OFFLINE, CTL_HA_MODE_ACT_STBY, CTL_HA_MODE_XFER, CTL_LUN_EJECTED, CTL_LUN_FLAG_READONLY, CTL_LUN_NO_MEDIA, CTL_LUN_PAT_WRITE, CTL_LUN_PEER_SC_PRIMARY, CTL_LUN_PR_RESERVED, CTL_LUN_PRIMARY_SC, CTL_LUN_REMOVABLE, CTL_LUN_RESERVED, CTL_LUN_STOPPED, ctl_set_hw_write_protected(), ctl_set_lun_ejected(), ctl_set_lun_int_reqd(), ctl_set_lun_no_media(), ctl_set_lun_standby(), ctl_set_lun_stopped(), ctl_set_lun_transit(), ctl_set_lun_unavail(), ctl_set_reservation_conflict(), ctl_set_sense(), ctl_lun::ctl_softc, ctl_be_lun::flags, ctl_cmd_entry::flags, ctl_lun::flags, ctl_softc::ha_link, ctl_softc::ha_mode, ctl_scsiio::io_hdr, ctl_lun::lun_lock, ctl_io_hdr::nexus, ctl_cmd_entry::pattern, ctl_lun::pr_res_idx, ctl_lun::pr_res_type, ctl_lun::res_idx, SCP_SWP, SPR_TYPE_WR_EX, SPR_TYPE_WR_EX_AR, SPR_TYPE_WR_EX_RO, SSD_ELEM_NONE, and SSD_KEY_DATA_PROTECT.
Referenced by ctl_handle_isc(), ctl_scsiio_precheck(), ctl_serialize_other_sc_cmd(), and ctl_try_unblock_io().
|
static |
Definition at line 11488 of file ctl.c.
References ctl_lun::be_lun, ctl_io_hdr::blocker, ctl_scsiio::cdb, ctl_ha_msg_scsi::cdb, ctl_scsiio::cdb_len, ctl_ha_msg_scsi::cdb_len, CTL_ACTION_BLOCK, CTL_ACTION_OVERLAP, CTL_ACTION_OVERLAP_TAG, CTL_ACTION_PASS, CTL_ACTION_SKIP, CTL_AUTOSENSE, CTL_BACKEND_LUN, ctl_build_ua(), ctl_check_ooa(), ctl_cmd_applicable(), CTL_CMD_FLAG_NO_SENSE, CTL_CMD_FLAG_OK_ON_NO_LUN, CTL_CMD_FLAG_RUN_HERE, CTL_DEBUG_PRINT, ctl_done(), ctl_enqueue_rtr(), CTL_FLAG_DATA_MASK, CTL_FLAG_IS_WAS_ON_RTR, CTL_FLAG_SENT_2OTHER_SC, ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_HA_STATUS_SUCCESS, CTL_LUN, CTL_LUN_DISABLED, CTL_LUN_PEER_SC_PRIMARY, CTL_LUN_PRIMARY_SC, ctl_softc::ctl_luns, CTL_MAX_CDBLEN, CTL_MAX_INIT_PER_PORT, ctl_max_luns, CTL_MSG_SERIALIZE, CTL_SCSI_ERROR, ctl_scsiio_lun_check(), ctl_set_busy(), ctl_set_invalid_opcode(), ctl_set_overlapped_cmd(), ctl_set_overlapped_tag(), ctl_set_unsupported_lun(), CTL_SOFTC, CTL_UA_NONE, ctl_validate_command(), scsi_sense_data::error_code, ctl_io_hdr::flags, ctl_cmd_entry::flags, ctl_lun::flags, ctl_ha_msg::hdr, ctl_scsiio::io_hdr, ctl_io::io_hdr, ctl_ha_msg::lun, ctl_lun::lun, ctl_lun::lun_lock, ctl_be_lun::lun_type, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_lun::pending_sense, ctl_scsiio::priority, ctl_ha_msg_scsi::priority, REQUEST_SENSE, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, SCSI_STATUS_CHECK_COND, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_hdr::serializing_sc, SSD_TYPE_NONE, ctl_io_hdr::status, ctl_scsiio::tag_num, ctl_ha_msg_scsi::tag_num, ctl_scsiio::tag_type, ctl_ha_msg_scsi::tag_type, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_run(), and ctl_work_thread().
|
static |
Definition at line 12602 of file ctl.c.
References ctl_failover_io(), CTL_FLAG_FAILOVER, CTL_HA_CHAN_CTL, ctl_ha_msg_send(), CTL_MSG_DATAMOVE_DONE, ctl_io_hdr::dma_bt, ctl_io_hdr::dma_start_bt, ctl_io_hdr::flags, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_scsiio::kern_data_resid, ctl_ha_msg_scsi::kern_data_resid, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_io_hdr::num_dmas, ctl_ha_msg_hdr::original_sc, ctl_io_hdr::port_status, ctl_ha_msg_scsi::port_status, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_scsiio::scsi_status, ctl_ha_msg_scsi::scsi_status, ctl_io::scsiio, ctl_scsiio::sense_data, ctl_ha_msg_scsi::sense_data, ctl_scsiio::sense_len, ctl_ha_msg_scsi::sense_len, ctl_ha_msg_hdr::serializing_sc, ctl_io_hdr::status, ctl_ha_msg_hdr::status, ctl_scsiio::tag_num, ctl_ha_msg_scsi::tag_num, ctl_scsiio::tag_type, and ctl_ha_msg_scsi::tag_type.
Referenced by ctl_datamove_remote(), ctl_datamove_remote_dm_read_cb(), ctl_datamove_remote_write_cb(), and ctl_datamove_remote_xfer().
|
static |
Definition at line 10974 of file ctl.c.
References CTL_ACTION_BLOCK, CTL_ACTION_PASS, CTL_FLAG_SERSEQ_DONE, ctl_get_lba_len(), ctl_io_hdr::flags, and ctl_io::io_hdr.
Referenced by ctl_check_for_blockage().
|
static |
Definition at line 2344 of file ctl.c.
References ctl_lun::be_lun, ctl_io_hdr::blocker, CTL_ACTION_BLOCK, CTL_ACTION_OVERLAP, CTL_ACTION_OVERLAP_TAG, CTL_ACTION_PASS, CTL_ACTION_SKIP, CTL_BACKEND_LUN, ctl_check_ooa(), ctl_copy_sense_data_back(), ctl_enqueue_rtr(), CTL_FLAG_IS_WAS_ON_RTR, ctl_free_io(), ctl_get_cmd_entry(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), ctl_softc::ctl_lock, CTL_LUN, CTL_LUN_DISABLED, ctl_softc::ctl_luns, ctl_max_luns, CTL_MSG_BAD_JUJU, CTL_MSG_R2R, CTL_PORT, CTL_PORT_STATUS_ONLINE, ctl_scsiio_lun_check(), ctl_set_busy(), ctl_set_internal_failure(), ctl_set_overlapped_cmd(), ctl_set_overlapped_tag(), CTL_SOFTC, ctl_io_hdr::flags, ctl_lun::flags, ctl_softc::ha_mode, ctl_ha_msg::hdr, ctl_scsiio::io_hdr, ctl_io::io_hdr, ctl_lun::lun, ctl_lun::lun_lock, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_ha_msg_hdr::serializing_sc, ctl_scsiio::seridx, ctl_cmd_entry::seridx, ctl_port::status, ctl_scsiio::tag_num, and ctl_nexus::targ_mapped_lun.
Referenced by ctl_handle_isc().
void ctl_serseq_done | ( | union ctl_io * | io | ) |
Definition at line 13347 of file ctl.c.
References CTL_FLAG_SERSEQ_DONE, CTL_LUN, ctl_try_unblock_others(), ctl_io_hdr::flags, ctl_io::io_hdr, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_rw(), ctl_be_block_biodone(), ctl_be_block_dispatch_file(), and ctl_be_block_dispatch_zvol().
int ctl_set_mask | ( | uint32_t * | mask, |
uint32_t | bit | ||
) |
Definition at line 3822 of file ctl.c.
Referenced by ctl_add_lun(), ctl_port_register(), and ctl_prevent_allow().
|
static |
Definition at line 3909 of file ctl.c.
References CTL_MAX_INIT_PER_PORT, and ctl_lun::lun.
Referenced by ctl_hndl_per_res_out_on_other_sc(), ctl_isc_lun_sync(), and ctl_persistent_reserve_out().
|
static |
Definition at line 2067 of file ctl.c.
References control_softc, ctl_frontend_deregister(), ctl_softc::ctl_lock, ctl_softc::ctl_lun_mask, ctl_softc::ctl_luns, ctl_softc::ctl_port_mask, ctl_softc::ctl_ports, ctl_tpc_shutdown(), ctl_softc::dev, ha_frontend, ctl_softc::io_zone, ctl_softc::is_single, ctl_thread::queue_lock, ctl_softc::shutdown, ctl_softc::sysctl_ctx, ctl_thread::thread, ctl_softc::threads, ctl_softc::thresh_thread, and worker_threads.
Referenced by ctl_module_event_handler().
int ctl_start_lun | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 4943 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::ctl_lun, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_config_write(), and ctl_be_block_config_write().
int ctl_start_stop | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5326 of file ctl.c.
References ctl_lun::backend, ctl_scsiio::cdb, ctl_backend_driver::config_write, CTL_DEBUG_PRINT, ctl_done(), ctl_get_initindex(), ctl_get_prkey(), CTL_LUN, CTL_LUN_NO_MEDIA, CTL_LUN_PR_RESERVED, CTL_LUN_REMOVABLE, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_reservation_conflict(), ctl_set_sense(), ctl_lun::flags, scsi_start_stop_unit::how, ctl_scsiio::io_hdr, ctl_lun::lun, ctl_io_hdr::nexus, ctl_lun::pr_res_idx, ctl_lun::pr_res_type, ctl_lun::prevent_count, SSD_ELEM_NONE, SSD_KEY_ILLEGAL_REQUEST, SSD_KEY_NOT_READY, SSS_LOEJ, SSS_PC_MASK, and SSS_START.
int ctl_stop_lun | ( | struct ctl_be_lun * | be_lun | ) |
Definition at line 4954 of file ctl.c.
References ctl_lun::be_lun, ctl_be_lun::ctl_lun, CTL_LUN_STOPPED, and ctl_lun::lun.
Referenced by ctl_backend_ramdisk_config_write(), and ctl_be_block_config_write().
int ctl_sync_cache | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5419 of file ctl.c.
References ctl_lun::backend, ctl_lun::be_lun, scsi_sync_cache::begin_lba, scsi_sync_cache_16::begin_lba, scsi_sync_cache::byte2, scsi_sync_cache_16::byte2, ctl_scsiio::cdb, ctl_backend_driver::config_write, CTL_DEBUG_PRINT, ctl_done(), CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, ctl_set_invalid_opcode(), ctl_set_lba_out_of_range(), ctl_lba_len_flags::flags, ctl_scsiio::io_hdr, scsi_sync_cache::lb_count, scsi_sync_cache_16::lb_count, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, ctl_lun::lun, ctl_be_lun::maxlba, scsi_2btoul(), scsi_4btoul(), scsi_8btou64(), SYNCHRONIZE_CACHE, and SYNCHRONIZE_CACHE_16.
|
static |
Definition at line 11810 of file ctl.c.
References ctl_do_lun_reset(), CTL_FLAG_FROM_OTHER_SC, ctl_get_initindex(), CTL_HA_CHAN_CTL, ctl_ha_msg_send(), ctl_softc::ctl_lock, ctl_lun_map_to_port(), CTL_MSG_MANAGE_TASKS, CTL_PORT, CTL_SOFTC, CTL_TASK_FUNCTION_COMPLETE, CTL_TASK_TARGET_RESET, CTL_UA_BUS_RESET, CTL_UA_TARG_RESET, ctl_io_hdr::flags, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_ha_msg::lun, ctl_lun::lun, ctl_ha_msg_hdr::msg_type, ctl_io_hdr::nexus, ctl_ha_msg_hdr::nexus, ctl_ha_msg_hdr::original_sc, ctl_ha_msg::port, ctl_ha_msg_hdr::serializing_sc, ctl_ha_msg::task, ctl_taskio::task_action, ctl_ha_msg_task::task_action, ctl_taskio::task_status, and ctl_io::taskio.
Referenced by ctl_run_task().
int ctl_temp_log_sense_handler | ( | struct ctl_scsiio * | ctsio, |
struct ctl_page_index * | page_index, | ||
int | pc | ||
) |
Definition at line 6730 of file ctl.c.
References ctl_lun::be_lun, CTL_LUN, scsi_log_temperature::hdr, ctl_lun::lun, ctl_be_lun::options, ctl_page_index::page_data, scsi_log_param_header::param_code, scsi_log_param_header::param_control, scsi_log_param_header::param_len, scsi_ulto2b(), SLP_LBIN, SLP_REFTEMPERATURE, SLP_TEMPERATURE, and scsi_log_temperature::temperature.
|
static |
Definition at line 13488 of file ctl.c.
References scsi_logical_block_provisioning_page_descr::count, ctl_clr_ua_all(), CTL_DEBUG_PRINT, ctl_est_ua_all(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), CTL_LBP_EXPONENT, CTL_LBP_PERIOD, CTL_LBP_UA_PERIOD, ctl_softc::ctl_lock, CTL_LUN_DISABLED, CTL_LUN_NO_MEDIA, CTL_LUN_PRIMARY_SC, CTL_MSG_UA, CTL_NUM_LBP_THRESH, CTL_UA_THIN_PROV_THRES, ctl_logical_block_provisioning_page::descr, ctl_ha_msg_lun::flags, scsi_logical_block_provisioning_page_descr::flags, ctl_softc::ha_mode, ctl_ha_msg::hdr, ctl_nexus::initid, ctl_ha_msg::lun, ctl_lun::lun, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_hdr::nexus, scsi_logical_block_provisioning_page_descr::resource, scsi_4btoul(), scsi_u64to8b(), ctl_softc::shutdown, SLBPPD_ARMING_INC, SLBPPD_ARMING_MASK, SLBPPD_ENABLED, SMS_RWER_LBPERE, ctl_nexus::targ_lun, ctl_nexus::targ_mapped_lun, ctl_nexus::targ_port, ctl_softc::thresh_thread, ctl_ha_msg::ua, ctl_ha_msg_ua::ua_all, ctl_ha_msg_ua::ua_info, ctl_ha_msg_ua::ua_set, and ctl_ha_msg_ua::ua_type.
Referenced by ctl_init().
Definition at line 11153 of file ctl.c.
References ctl_io_hdr::blocker, CTL_ACTION_BLOCK, CTL_ACTION_OVERLAP, CTL_ACTION_OVERLAP_TAG, CTL_ACTION_PASS, CTL_ACTION_SKIP, ctl_check_ooa(), ctl_copy_sense_data_back(), ctl_done(), ctl_enqueue_rtr(), CTL_FLAG_FROM_OTHER_SC, CTL_FLAG_IS_WAS_ON_RTR, ctl_free_io(), ctl_get_cmd_entry(), CTL_HA_CHAN_CTL, CTL_HA_MODE_XFER, ctl_ha_msg_send(), CTL_MSG_BAD_JUJU, CTL_MSG_R2R, ctl_scsiio_lun_check(), ctl_set_overlapped_cmd(), ctl_set_overlapped_tag(), ctl_lun::ctl_softc, ctl_try_unblock_others(), ctl_io_hdr::flags, ctl_softc::ha_mode, ctl_ha_msg::hdr, ctl_io::io_hdr, ctl_ha_msg::lun, ctl_ha_msg_hdr::msg_type, ctl_ha_msg_hdr::original_sc, ctl_io_hdr::remote_io, ctl_ha_msg::scsi, ctl_io::scsiio, ctl_ha_msg_hdr::serializing_sc, and ctl_scsiio::tag_num.
Referenced by ctl_abort_task(), ctl_abort_tasks_lun(), ctl_do_lun_reset(), ctl_failover_lun(), and ctl_try_unblock_others().
Definition at line 11255 of file ctl.c.
References ctl_io_hdr::blocker, ctl_try_unblock_io(), ctl_io::io_hdr, and ctl_lun::lun_lock.
Referenced by ctl_failover_lun(), ctl_handle_isc(), ctl_process_done(), ctl_serseq_done(), ctl_try_unblock_io(), and ctl_unmap().
int ctl_tur | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 9432 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_done(), CTL_RETVAL_COMPLETE, and ctl_set_success().
|
static |
Definition at line 10662 of file ctl.c.
References scsi_mechanism_status_header::lba.
Referenced by ctl_read_toc().
int ctl_unmap | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5832 of file ctl.c.
References ctl_lun::backend, ctl_lun::be_lun, ctl_scsiio::be_move_done, scsi_unmap::byte2, ctl_scsiio::cdb, ctl_backend_driver::config_write, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_lba_out_of_range(), ctl_set_success(), ctl_try_unblock_others(), scsi_unmap_header::desc_length, ctl_ptr_len_flags::flags, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_data_resid, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_unmap_desc::lba, ctl_ptr_len_flags::len, scsi_unmap::length, scsi_unmap_header::length, scsi_unmap_desc::length, ctl_lun::lun, ctl_lun::lun_lock, ctl_be_lun::maxlba, ctl_ptr_len_flags::ptr, scsi_2btoul(), scsi_4btoul(), and scsi_8btou64().
|
static |
Definition at line 11715 of file ctl.c.
References ctl_scsiio::cdb, ctl_done(), ctl_get_cmd_entry(), ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_cmd_entry::execute, ctl_cmd_entry::length, ctl_scsiio::seridx, and ctl_cmd_entry::seridx.
Referenced by ctl_scsiio_precheck().
int ctl_verify | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 9054 of file ctl.c.
References scsi_verify_10::addr, scsi_verify_12::addr, scsi_rw_16::addr, ctl_lun::backend, ctl_lun::be_lun, ctl_be_lun::blocksize, scsi_rw_16::byte2, scsi_verify_10::byte2, scsi_verify_12::byte2, ctl_scsiio::cdb, CTL_DEBUG_PRINT, ctl_done(), CTL_LLF_COMPARE, CTL_LLF_DPO, CTL_LLF_FUA, CTL_LLF_VERIFY, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_opcode(), ctl_set_lba_out_of_range(), ctl_set_success(), ctl_backend_driver::data_submit, ctl_lba_len_flags::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_total_len, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, scsi_verify_10::length, scsi_rw_16::length, scsi_verify_12::length, ctl_lun::lun, ctl_be_lun::maxlba, scsi_2btoul(), scsi_4btoul(), scsi_8btou64(), SVFY_BYTCHK, SVFY_DPO, VERIFY_10, VERIFY_12, and VERIFY_16.
|
static |
Definition at line 13421 of file ctl.c.
References CTL_DEBUG_PRINT, ctl_handle_isc(), CTL_IO_TASK, ctl_process_done(), CTL_RETVAL_COMPLETE, ctl_run_task(), ctl_scsiio(), ctl_scsiio_precheck(), ctl_thread::ctl_softc, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_thread::queue_lock, ctl_io::scsiio, ctl_softc::shutdown, and ctl_thread::thread.
Referenced by ctl_init().
int ctl_write_buffer | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5638 of file ctl.c.
References ctl_scsiio::be_move_done, ctl_scsiio::cdb, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), CTL_WRITE_BUFFER_SIZE, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, scsi_write_buffer::length, ctl_lun::lun, scsi_write_buffer::offset, scsi_3btoul(), and ctl_lun::write_buffer.
int ctl_write_same | ( | struct ctl_scsiio * | ctsio | ) |
Definition at line 5712 of file ctl.c.
References scsi_write_same_10::addr, scsi_write_same_16::addr, ctl_lun::backend, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_be_lun::blocksize, scsi_write_same_10::byte2, scsi_write_same_16::byte2, ctl_scsiio::cdb, ctl_backend_driver::config_write, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), ctl_expand_number(), CTL_FLAG_ALLOCATED, CTL_FLAG_IO_CONT, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_invalid_opcode(), ctl_set_lba_out_of_range(), ctl_write_same_cont(), ctl_lba_len_flags::flags, ctl_io_hdr::flags, ctl_scsiio::io_cont, ctl_scsiio::io_hdr, ctl_scsiio::kern_data_len, ctl_scsiio::kern_data_ptr, ctl_scsiio::kern_rel_offset, ctl_scsiio::kern_sg_entries, ctl_scsiio::kern_total_len, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, scsi_write_same_10::length, scsi_write_same_16::length, ctl_lun::lun, ctl_be_lun::maxlba, ctl_be_lun::options, scsi_2btoul(), scsi_4btoul(), scsi_8btou64(), SWS_ANCHOR, SWS_NDOB, SWS_UNMAP, WRITE_SAME_10, and WRITE_SAME_16.
|
static |
Definition at line 5689 of file ctl.c.
References ctl_lun::backend, ctl_lun::be_lun, ctl_backend_driver::config_write, CTL_DEBUG_PRINT, CTL_LUN, CTL_PRIV_LBA_LEN, ctl_io_hdr::ctl_private, CTL_STATUS_NONE, ctl_io_hdr::flags, ctl_scsiio::io_hdr, ctl_lba_len_flags::lba, ctl_lba_len_flags::len, ctl_lun::lun, ctl_be_lun::maxlba, ctl_io::scsiio, and ctl_io_hdr::status.
Referenced by ctl_write_same().
void ctl_zero_io | ( | union ctl_io * | io | ) |
Definition at line 4003 of file ctl.c.
References CTL_SOFTC, ctl_io_pool::ctl_softc, ctl_io::io_hdr, and ctl_io_hdr::pool.
Referenced by cfcs_action(), cfiscsi_pdu_handle_scsi_command(), cfiscsi_pdu_handle_task_request(), cfiscsi_session_terminate_tasks(), ctl_isc_event_handler(), ctl_isc_ha_link_down(), and ctlfedone().
DECLARE_MODULE | ( | ctl | , |
ctl_moduledata | , | ||
SI_SUB_CONFIGURE | , | ||
SI_ORDER_THIRD | |||
) |
|
static |
Definition at line 4534 of file ctl.c.
Referenced by ctl_add_lun(), and ctl_report_ident_info().
MALLOC_DEFINE | ( | M_CTL | , |
"ctlmem" | , | ||
"Memory used for CTL" | |||
) |
MODULE_VERSION | ( | ctl | , |
1 | |||
) |
SYSCTL_INT | ( | _kern_cam_ctl | , |
OID_AUTO | , | ||
debug | , | ||
CTLFLAG_RWTUN | , | ||
& | ctl_debug, | ||
0 | , | ||
"Enabled debug flags" | |||
) |
SYSCTL_INT | ( | _kern_cam_ctl | , |
OID_AUTO | , | ||
lun_map_size | , | ||
CTLFLAG_RWTUN | , | ||
& | ctl_lun_map_size, | ||
0 | , | ||
"Size of per-port LUN map (max LUN + 1)" | |||
) |
SYSCTL_INT | ( | _kern_cam_ctl | , |
OID_AUTO | , | ||
max_luns | , | ||
CTLFLAG_RDTUN | , | ||
& | ctl_max_luns, | ||
CTL_DEFAULT_MAX_LUNS | , | ||
"Maximum number of LUNs" | |||
) |
SYSCTL_INT | ( | _kern_cam_ctl | , |
OID_AUTO | , | ||
max_ports | , | ||
CTLFLAG_RDTUN | , | ||
& | ctl_max_ports, | ||
CTL_DEFAULT_MAX_LUNS | , | ||
"Maximum number of ports" | |||
) |
SYSCTL_INT | ( | _kern_cam_ctl | , |
OID_AUTO | , | ||
worker_threads | , | ||
CTLFLAG_RDTUN | , | ||
& | worker_threads, | ||
1 | , | ||
"Number of worker threads" | |||
) |
SYSCTL_NODE | ( | _kern_cam | , |
OID_AUTO | , | ||
ctl | , | ||
CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
0 | , | ||
"CAM Target Layer" | |||
) |
TUNABLE_INT | ( | "kern.cam.ctl.max_luns" | , |
& | ctl_max_luns | ||
) |
TUNABLE_INT | ( | "kern.cam.ctl.max_ports" | , |
& | ctl_max_ports | ||
) |
|
static |
Definition at line 230 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 214 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 386 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 363 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 281 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 272 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 258 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 246 of file ctl.c.
Referenced by ctl_init_page_index().
struct ctl_softc* control_softc = NULL |
Definition at line 92 of file ctl.c.
Referenced by ctl_add_lun(), ctl_backend_deregister(), ctl_backend_find(), ctl_backend_ramdisk_create(), ctl_backend_ramdisk_modify(), ctl_backend_register(), ctl_be_block_create(), ctl_be_block_modify(), ctl_frontend_deregister(), ctl_frontend_find(), ctl_frontend_register(), ctl_ha_init(), ctl_ha_shutdown(), ctl_init(), ctl_isc_event_handler(), ctl_port_register(), and ctl_shutdown().
|
static |
Definition at line 578 of file ctl.c.
Referenced by ctl_init().
|
static |
Definition at line 414 of file ctl.c.
Referenced by ctl_config_move_done(), ctl_datamove_done_process(), ctl_process_done(), ctl_queue(), and ctl_run().
|
static |
Definition at line 417 of file ctl.c.
Referenced by ctl_lun_map_init().
|
static |
Definition at line 430 of file ctl.c.
Referenced by ctl_abort_task(), ctl_abort_task_set(), ctl_add_lun(), ctl_failover_lun(), ctl_handle_isc(), ctl_hndl_per_res_out_on_other_sc(), ctl_init(), ctl_ioctl(), ctl_isc_ha_link_up(), ctl_isc_login(), ctl_isc_lun_sync(), ctl_isc_mode_sync(), ctl_isc_ua(), ctl_lun_reset(), ctl_query_async_event(), ctl_query_task(), ctl_queue_sense(), ctl_report_luns(), ctl_scsiio_precheck(), and ctl_serialize_other_sc_cmd().
|
static |
Definition at line 439 of file ctl.c.
Referenced by ctl_add_lun(), ctl_do_lun_reset(), ctl_free_lun(), ctl_init(), ctl_ioctl(), ctl_isc_ha_link_up(), and ctl_isc_login().
|
static |
|
static |
Definition at line 147 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 130 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 600 of file ctl.c.
Referenced by ctl_ha_shutdown(), ctl_init(), ctl_isc_port_sync(), and ctl_shutdown().
|
static |
Definition at line 299 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 290 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 337 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 311 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 180 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 163 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 116 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 102 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 205 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 196 of file ctl.c.
Referenced by ctl_init_page_index().
|
static |
Definition at line 411 of file ctl.c.
Referenced by ctl_enqueue_done(), ctl_enqueue_incoming(), ctl_enqueue_isc(), ctl_enqueue_rtr(), ctl_init(), and ctl_shutdown().