FreeBSD kernel CAM code
ctl_private.h File Reference
Include dependency graph for ctl_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ctl_io_pool
 
struct  ctl_cmd_entry
 
union  ctl_softcs
 
struct  ctl_page_index
 
struct  ctl_logical_block_provisioning_page
 
struct  ctl_mode_pages
 
struct  ctl_log_pages
 
struct  ctl_log_pages::stat_page
 
struct  ctl_lun_delay_info
 
struct  ctl_devid
 
struct  ctl_lun
 
struct  ctl_thread
 
struct  ctl_softc
 

Macros

#define CTL_VENDOR   "FREEBSD "
 
#define CTL_DIRECT_PRODUCT   "CTLDISK "
 
#define CTL_PROCESSOR_PRODUCT   "CTLPROCESSOR "
 
#define CTL_CDROM_PRODUCT   "CTLCDROM "
 
#define CTL_UNKNOWN_PRODUCT   "CTLDEVICE "
 
#define CTL_POOL_ENTRIES_OTHER_SC   200
 
#define CTL_DEFAULT_SECTORS_PER_TRACK   256
 
#define CTL_DEFAULT_HEADS   128
 
#define CTL_DEFAULT_ROTATION_RATE   SVPD_NON_ROTATING
 
#define CTL_PAGE_CURRENT   0x00
 
#define CTL_PAGE_CHANGEABLE   0x01
 
#define CTL_PAGE_DEFAULT   0x02
 
#define CTL_PAGE_SAVED   0x03
 
#define CTL_NUM_LBP_PARAMS   4
 
#define CTL_NUM_LBP_THRESH   4
 
#define CTL_LBP_EXPONENT   11 /* 2048 sectors */
 
#define CTL_LBP_PERIOD   10 /* 10 seconds */
 
#define CTL_LBP_UA_PERIOD   300 /* 5 minutes */
 
#define CTL_NUM_MODE_PAGES
 
#define MODE_RWER   mode_pages.rw_er_page[CTL_PAGE_CURRENT]
 
#define MODE_FMT   mode_pages.format_page[CTL_PAGE_CURRENT]
 
#define MODE_RDISK   mode_pages.rigid_disk_page[CTL_PAGE_CURRENT]
 
#define MODE_VER   mode_pages.verify_er_page[CTL_PAGE_CURRENT]
 
#define MODE_CACHING   mode_pages.caching_page[CTL_PAGE_CURRENT]
 
#define MODE_CTRL   mode_pages.control_page[CTL_PAGE_CURRENT]
 
#define MODE_CTRLE   mode_pages.control_ext_page[CTL_PAGE_CURRENT]
 
#define MODE_IE   mode_pages.ie_page[CTL_PAGE_CURRENT]
 
#define MODE_LBP   mode_pages.lbp_page[CTL_PAGE_CURRENT]
 
#define MODE_CDDVD   mode_pages.cddvd_page[CTL_PAGE_CURRENT]
 
#define CTL_NUM_LOG_PAGES
 
#define CTL_PR_ALL_REGISTRANTS   0xFFFFFFFF
 
#define CTL_PR_NO_RESERVATION   0xFFFFFFF0
 
#define NUM_HA_SHELVES   2
 
#define CTL_WRITE_BUFFER_SIZE   262144
 
#define CTL_MAX_THREADS   16
 

Typedefs

typedef int ctl_opfunc(struct ctl_scsiio *ctsio)
 
typedef int ctl_modesen_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)
 
typedef int ctl_modesel_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr)
 

Enumerations

enum  ctl_serialize_action {
  CTL_SER_SEQ , CTL_SER_PASS , CTL_SER_EXTENTOPT , CTL_SER_EXTENT ,
  CTL_SER_BLOCKOPT , CTL_SER_BLOCK
}
 
enum  ctl_action {
  CTL_ACTION_PASS , CTL_ACTION_SKIP , CTL_ACTION_BLOCK , CTL_ACTION_OVERLAP ,
  CTL_ACTION_OVERLAP_TAG
}
 
enum  ctl_cmd_flags {
  CTL_CMD_FLAG_NONE = 0x0000 , CTL_CMD_FLAG_NO_SENSE = 0x0010 , CTL_CMD_FLAG_ALLOW_ON_RESV = 0x0020 , CTL_CMD_FLAG_ALLOW_ON_PR_RESV = 0x0040 ,
  CTL_CMD_FLAG_ALLOW_ON_PR_WRESV = 0x0080 , CTL_CMD_FLAG_OK_ON_PROC = 0x0100 , CTL_CMD_FLAG_OK_ON_DIRECT = 0x0200 , CTL_CMD_FLAG_OK_ON_CDROM = 0x0400 ,
  CTL_CMD_FLAG_OK_ON_BOTH = 0x0700 , CTL_CMD_FLAG_OK_ON_NO_LUN = 0x0800 , CTL_CMD_FLAG_OK_ON_NO_MEDIA = 0x1000 , CTL_CMD_FLAG_OK_ON_STANDBY = 0x2000 ,
  CTL_CMD_FLAG_OK_ON_UNAVAIL = 0x4000 , CTL_CMD_FLAG_SA5 = 0x8000 , CTL_CMD_FLAG_RUN_HERE = 0x10000
}
 
enum  ctl_seridx {
  CTL_SERIDX_TUR = 0 , CTL_SERIDX_READ , CTL_SERIDX_WRITE , CTL_SERIDX_UNMAP ,
  CTL_SERIDX_SYNC , CTL_SERIDX_MD_SNS , CTL_SERIDX_MD_SEL , CTL_SERIDX_RQ_SNS ,
  CTL_SERIDX_INQ , CTL_SERIDX_RD_CAP , CTL_SERIDX_RES , CTL_SERIDX_LOG_SNS ,
  CTL_SERIDX_FORMAT , CTL_SERIDX_START , CTL_SERIDX_COUNT , CTL_SERIDX_INVLD = CTL_SERIDX_COUNT
}
 
enum  ctl_lun_flags {
  CTL_LUN_NONE = 0x000 , CTL_LUN_CONTROL = 0x001 , CTL_LUN_RESERVED = 0x002 , CTL_LUN_INVALID = 0x004 ,
  CTL_LUN_DISABLED = 0x008 , CTL_LUN_STOPPED = 0x020 , CTL_LUN_NO_MEDIA = 0x040 , CTL_LUN_EJECTED = 0x080 ,
  CTL_LUN_PR_RESERVED = 0x100 , CTL_LUN_PRIMARY_SC = 0x200 , CTL_LUN_READONLY = 0x800 , CTL_LUN_PEER_SC_PRIMARY = 0x1000 ,
  CTL_LUN_REMOVABLE = 0x2000
}
 
enum  ctlblock_flags { CTLBLOCK_FLAG_NONE = 0x00 , CTLBLOCK_FLAG_INVALID = 0x01 }
 
enum  ctl_page_flags {
  CTL_PAGE_FLAG_NONE = 0x00 , CTL_PAGE_FLAG_DIRECT = 0x01 , CTL_PAGE_FLAG_PROC = 0x02 , CTL_PAGE_FLAG_CDROM = 0x04 ,
  CTL_PAGE_FLAG_ALL = 0x07
}
 
enum  ctl_gen_flags { CTL_FLAG_ACTIVE_SHELF = 0x04 }
 

Functions

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 plun)
 
uint32_t ctl_lun_map_to_port (struct ctl_port *port, uint32_t glun)
 
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)
 
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)
 
int ctl_write_same (struct ctl_scsiio *ctsio)
 
int ctl_unmap (struct ctl_scsiio *ctsio)
 
int ctl_mode_select (struct ctl_scsiio *ctsio)
 
int ctl_mode_sense (struct ctl_scsiio *ctsio)
 
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_read_defect (struct ctl_scsiio *ctsio)
 
int ctl_read_toc (struct ctl_scsiio *ctsio)
 
int ctl_read_write (struct ctl_scsiio *ctsio)
 
int ctl_cnw (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_verify (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)
 
int ctl_persistent_reserve_in (struct ctl_scsiio *ctsio)
 
int ctl_persistent_reserve_out (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_get_lba_status (struct ctl_scsiio *ctsio)
 
void ctl_tpc_init (struct ctl_softc *softc)
 
void ctl_tpc_shutdown (struct ctl_softc *softc)
 
void ctl_tpc_lun_init (struct ctl_lun *lun)
 
void ctl_tpc_lun_clear (struct ctl_lun *lun, uint32_t initidx)
 
void ctl_tpc_lun_shutdown (struct ctl_lun *lun)
 
int ctl_inquiry_evpd_tpc (struct ctl_scsiio *ctsio, int alloc_len)
 
int ctl_receive_copy_status_lid1 (struct ctl_scsiio *ctsio)
 
int ctl_receive_copy_failure_details (struct ctl_scsiio *ctsio)
 
int ctl_receive_copy_status_lid4 (struct ctl_scsiio *ctsio)
 
int ctl_receive_copy_operating_parameters (struct ctl_scsiio *ctsio)
 
int ctl_extended_copy_lid1 (struct ctl_scsiio *ctsio)
 
int ctl_extended_copy_lid4 (struct ctl_scsiio *ctsio)
 
int ctl_copy_operation_abort (struct ctl_scsiio *ctsio)
 
int ctl_populate_token (struct ctl_scsiio *ctsio)
 
int ctl_write_using_token (struct ctl_scsiio *ctsio)
 
int ctl_receive_rod_token_information (struct ctl_scsiio *ctsio)
 
int ctl_report_all_rod_tokens (struct ctl_scsiio *ctsio)
 

Variables

static const struct ctl_page_index page_index_template []
 
static const struct ctl_page_index log_page_index_template []
 
const struct ctl_cmd_entry ctl_cmd_table [256]
 

Macro Definition Documentation

◆ CTL_CDROM_PRODUCT

#define CTL_CDROM_PRODUCT   "CTLCDROM "

Definition at line 55 of file ctl_private.h.

◆ CTL_DEFAULT_HEADS

#define CTL_DEFAULT_HEADS   128

Definition at line 224 of file ctl_private.h.

◆ CTL_DEFAULT_ROTATION_RATE

#define CTL_DEFAULT_ROTATION_RATE   SVPD_NON_ROTATING

Definition at line 226 of file ctl_private.h.

◆ CTL_DEFAULT_SECTORS_PER_TRACK

#define CTL_DEFAULT_SECTORS_PER_TRACK   256

Definition at line 223 of file ctl_private.h.

◆ CTL_DIRECT_PRODUCT

#define CTL_DIRECT_PRODUCT   "CTLDISK "

Definition at line 53 of file ctl_private.h.

◆ CTL_LBP_EXPONENT

#define CTL_LBP_EXPONENT   11 /* 2048 sectors */

Definition at line 262 of file ctl_private.h.

◆ CTL_LBP_PERIOD

#define CTL_LBP_PERIOD   10 /* 10 seconds */

Definition at line 263 of file ctl_private.h.

◆ CTL_LBP_UA_PERIOD

#define CTL_LBP_UA_PERIOD   300 /* 5 minutes */

Definition at line 264 of file ctl_private.h.

◆ CTL_MAX_THREADS

#define CTL_MAX_THREADS   16

Definition at line 423 of file ctl_private.h.

◆ CTL_NUM_LBP_PARAMS

#define CTL_NUM_LBP_PARAMS   4

Definition at line 260 of file ctl_private.h.

◆ CTL_NUM_LBP_THRESH

#define CTL_NUM_LBP_THRESH   4

Definition at line 261 of file ctl_private.h.

◆ CTL_NUM_LOG_PAGES

#define CTL_NUM_LOG_PAGES
Value:
static const struct ctl_page_index log_page_index_template[]
Definition: ctl_private.h:326

Definition at line 341 of file ctl_private.h.

◆ CTL_NUM_MODE_PAGES

#define CTL_NUM_MODE_PAGES
Value:
static const struct ctl_page_index page_index_template[]
Definition: ctl_private.h:271

Definition at line 298 of file ctl_private.h.

◆ CTL_PAGE_CHANGEABLE

#define CTL_PAGE_CHANGEABLE   0x01

Definition at line 256 of file ctl_private.h.

◆ CTL_PAGE_CURRENT

#define CTL_PAGE_CURRENT   0x00

Definition at line 255 of file ctl_private.h.

◆ CTL_PAGE_DEFAULT

#define CTL_PAGE_DEFAULT   0x02

Definition at line 257 of file ctl_private.h.

◆ CTL_PAGE_SAVED

#define CTL_PAGE_SAVED   0x03

Definition at line 258 of file ctl_private.h.

◆ CTL_POOL_ENTRIES_OTHER_SC

#define CTL_POOL_ENTRIES_OTHER_SC   200

Definition at line 58 of file ctl_private.h.

◆ CTL_PR_ALL_REGISTRANTS

#define CTL_PR_ALL_REGISTRANTS   0xFFFFFFFF

Definition at line 365 of file ctl_private.h.

◆ CTL_PR_NO_RESERVATION

#define CTL_PR_NO_RESERVATION   0xFFFFFFF0

Definition at line 366 of file ctl_private.h.

◆ CTL_PROCESSOR_PRODUCT

#define CTL_PROCESSOR_PRODUCT   "CTLPROCESSOR "

Definition at line 54 of file ctl_private.h.

◆ CTL_UNKNOWN_PRODUCT

#define CTL_UNKNOWN_PRODUCT   "CTLDEVICE "

Definition at line 56 of file ctl_private.h.

◆ CTL_VENDOR

#define CTL_VENDOR   "FREEBSD "

Definition at line 52 of file ctl_private.h.

◆ CTL_WRITE_BUFFER_SIZE

#define CTL_WRITE_BUFFER_SIZE   262144

Definition at line 375 of file ctl_private.h.

◆ MODE_CACHING

#define MODE_CACHING   mode_pages.caching_page[CTL_PAGE_CURRENT]

Definition at line 319 of file ctl_private.h.

◆ MODE_CDDVD

#define MODE_CDDVD   mode_pages.cddvd_page[CTL_PAGE_CURRENT]

Definition at line 324 of file ctl_private.h.

◆ MODE_CTRL

#define MODE_CTRL   mode_pages.control_page[CTL_PAGE_CURRENT]

Definition at line 320 of file ctl_private.h.

◆ MODE_CTRLE

#define MODE_CTRLE   mode_pages.control_ext_page[CTL_PAGE_CURRENT]

Definition at line 321 of file ctl_private.h.

◆ MODE_FMT

#define MODE_FMT   mode_pages.format_page[CTL_PAGE_CURRENT]

Definition at line 316 of file ctl_private.h.

◆ MODE_IE

#define MODE_IE   mode_pages.ie_page[CTL_PAGE_CURRENT]

Definition at line 322 of file ctl_private.h.

◆ MODE_LBP

#define MODE_LBP   mode_pages.lbp_page[CTL_PAGE_CURRENT]

Definition at line 323 of file ctl_private.h.

◆ MODE_RDISK

#define MODE_RDISK   mode_pages.rigid_disk_page[CTL_PAGE_CURRENT]

Definition at line 317 of file ctl_private.h.

◆ MODE_RWER

#define MODE_RWER   mode_pages.rw_er_page[CTL_PAGE_CURRENT]

Definition at line 315 of file ctl_private.h.

◆ MODE_VER

#define MODE_VER   mode_pages.verify_er_page[CTL_PAGE_CURRENT]

Definition at line 318 of file ctl_private.h.

◆ NUM_HA_SHELVES

#define NUM_HA_SHELVES   2

Definition at line 373 of file ctl_private.h.

Typedef Documentation

◆ ctl_modesel_handler

typedef int ctl_modesel_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr)

Definition at line 233 of file ctl_private.h.

◆ ctl_modesen_handler

typedef int ctl_modesen_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)

Definition at line 230 of file ctl_private.h.

◆ ctl_opfunc

typedef int ctl_opfunc(struct ctl_scsiio *ctsio)

Definition at line 130 of file ctl_private.h.

Enumeration Type Documentation

◆ ctl_action

enum ctl_action
Enumerator
CTL_ACTION_PASS 
CTL_ACTION_SKIP 
CTL_ACTION_BLOCK 
CTL_ACTION_OVERLAP 
CTL_ACTION_OVERLAP_TAG 

Definition at line 76 of file ctl_private.h.

◆ ctl_cmd_flags

Enumerator
CTL_CMD_FLAG_NONE 
CTL_CMD_FLAG_NO_SENSE 
CTL_CMD_FLAG_ALLOW_ON_RESV 
CTL_CMD_FLAG_ALLOW_ON_PR_RESV 
CTL_CMD_FLAG_ALLOW_ON_PR_WRESV 
CTL_CMD_FLAG_OK_ON_PROC 
CTL_CMD_FLAG_OK_ON_DIRECT 
CTL_CMD_FLAG_OK_ON_CDROM 
CTL_CMD_FLAG_OK_ON_BOTH 
CTL_CMD_FLAG_OK_ON_NO_LUN 
CTL_CMD_FLAG_OK_ON_NO_MEDIA 
CTL_CMD_FLAG_OK_ON_STANDBY 
CTL_CMD_FLAG_OK_ON_UNAVAIL 
CTL_CMD_FLAG_SA5 
CTL_CMD_FLAG_RUN_HERE 

Definition at line 92 of file ctl_private.h.

◆ ctl_gen_flags

Enumerator
CTL_FLAG_ACTIVE_SHELF 

Definition at line 419 of file ctl_private.h.

◆ ctl_lun_flags

Enumerator
CTL_LUN_NONE 
CTL_LUN_CONTROL 
CTL_LUN_RESERVED 
CTL_LUN_INVALID 
CTL_LUN_DISABLED 
CTL_LUN_STOPPED 
CTL_LUN_NO_MEDIA 
CTL_LUN_EJECTED 
CTL_LUN_PR_RESERVED 
CTL_LUN_PRIMARY_SC 
CTL_LUN_READONLY 
CTL_LUN_PEER_SC_PRIMARY 
CTL_LUN_REMOVABLE 

Definition at line 142 of file ctl_private.h.

◆ ctl_page_flags

Enumerator
CTL_PAGE_FLAG_NONE 
CTL_PAGE_FLAG_DIRECT 
CTL_PAGE_FLAG_PROC 
CTL_PAGE_FLAG_CDROM 
CTL_PAGE_FLAG_ALL 

Definition at line 237 of file ctl_private.h.

◆ ctl_serialize_action

Enumerator
CTL_SER_SEQ 
CTL_SER_PASS 
CTL_SER_EXTENTOPT 
CTL_SER_EXTENT 
CTL_SER_BLOCKOPT 
CTL_SER_BLOCK 

Definition at line 67 of file ctl_private.h.

◆ ctl_seridx

enum ctl_seridx
Enumerator
CTL_SERIDX_TUR 
CTL_SERIDX_READ 
CTL_SERIDX_WRITE 
CTL_SERIDX_UNMAP 
CTL_SERIDX_SYNC 
CTL_SERIDX_MD_SNS 
CTL_SERIDX_MD_SEL 
CTL_SERIDX_RQ_SNS 
CTL_SERIDX_INQ 
CTL_SERIDX_RD_CAP 
CTL_SERIDX_RES 
CTL_SERIDX_LOG_SNS 
CTL_SERIDX_FORMAT 
CTL_SERIDX_START 
CTL_SERIDX_COUNT 
CTL_SERIDX_INVLD 

Definition at line 110 of file ctl_private.h.

◆ ctlblock_flags

Enumerator
CTLBLOCK_FLAG_NONE 
CTLBLOCK_FLAG_INVALID 

Definition at line 158 of file ctl_private.h.

Function Documentation

◆ ctl_cnw()

◆ ctl_copy_operation_abort()

◆ ctl_extended_copy_lid1()

◆ ctl_extended_copy_lid4()

◆ ctl_format()

◆ ctl_get_config()

◆ ctl_get_event_status()

◆ ctl_get_initindex()

◆ ctl_get_lba_status()

◆ ctl_inquiry()

int ctl_inquiry ( struct ctl_scsiio ctsio)

◆ ctl_inquiry_evpd_tpc()

int ctl_inquiry_evpd_tpc ( struct ctl_scsiio ctsio,
int  alloc_len 
)

Definition at line 272 of file ctl_tpc.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_tpc_descriptor_gco::data_segment_granularity, scsi_vpd_tpc_descriptor_bdrl::default_inactivity_timeout, scsi_vpd_tpc_descriptor::desc_length, scsi_vpd_tpc_descriptor_bdrl::desc_length, scsi_vpd_tpc_descriptor_sc::desc_length, scsi_vpd_tpc_descriptor_pd::desc_length, scsi_vpd_tpc_descriptor_sd::desc_length, scsi_vpd_tpc_descriptor_sdid::desc_length, scsi_vpd_tpc_descriptor_rtf_block::desc_length, scsi_vpd_tpc_descriptor_rtf::desc_length, scsi_vpd_tpc_descriptor_srt::desc_length, scsi_vpd_tpc_descriptor_gco::desc_length, scsi_vpd_tpc_descriptor_bdrl::desc_type, scsi_vpd_tpc_descriptor_sc::desc_type, scsi_vpd_tpc_descriptor_pd::desc_type, scsi_vpd_tpc_descriptor_sd::desc_type, scsi_vpd_tpc_descriptor_sdid::desc_type, scsi_vpd_tpc_descriptor_rtf::desc_type, scsi_vpd_tpc_descriptor_srt::desc_type, scsi_vpd_tpc_descriptor_gco::desc_type, scsi_vpd_tpc_descriptor_sc::descr, scsi_vpd_tpc::descr, scsi_vpd_tpc::device, EC_COA, EC_CSCD_ID, EC_EC_LID1, EC_EC_LID4, EC_PT, EC_SEG_B2B, EC_SEG_REGISTER_KEY, EC_SEG_VERIFY, EC_WUT, EXTENDED_COPY, ctl_io_hdr::flags, scsi_vpd_tpc_descriptor_srtd::flags, scsi_vpd_tpc_descriptor_gco::inline_data_granularity, 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_tpc_descriptor_sc::list_length, scsi_vpd_tpc_descriptor_sd::list_length, scsi_vpd_tpc_descriptor_sdid::list_length, ctl_lun::lun, ctl_be_lun::lun_type, scsi_vpd_tpc_descriptor_rtf_block::maximum_bytes, scsi_vpd_tpc_descriptor_pd::maximum_cscd_descriptor_count, scsi_vpd_tpc_descriptor_pd::maximum_descriptor_list_length, scsi_vpd_tpc_descriptor_gco::maximum_identified_concurrent_copies, scsi_vpd_tpc_descriptor_bdrl::maximum_inactivity_timeout, scsi_vpd_tpc_descriptor_pd::maximum_inline_data_length, scsi_vpd_tpc_descriptor_bdrl::maximum_ranges, scsi_vpd_tpc_descriptor_pd::maximum_segment_descriptor_count, scsi_vpd_tpc_descriptor_gco::maximum_segment_length, scsi_vpd_tpc_descriptor_rtf::maximum_token_inactivity_timeout, scsi_vpd_tpc_descriptor_rtf::maximum_token_lifetime, scsi_vpd_tpc_descriptor_bdrl::maximum_token_transfer_size, scsi_vpd_tpc_descriptor_rtf::minimum_token_lifetime, scsi_vpd_tpc_descriptor_sc_descr::opcode, scsi_vpd_tpc_descriptor_rtf_block::optimal_bytes, scsi_vpd_tpc_descriptor_rtf_block::optimal_bytes_from_token_per_segment, scsi_vpd_tpc_descriptor_rtf_block::optimal_bytes_to_token_per_segment, scsi_vpd_tpc_descriptor_rtf_block::optimal_length_granularity, scsi_vpd_tpc_descriptor_bdrl::optimal_transfer_count, scsi_vpd_tpc::page_code, scsi_vpd_tpc::page_length, scsi_vpd_tpc_descriptor::parameters, scsi_vpd_tpc_descriptor_srtd::preference_indicator, RCS_RART, RCS_RCFD, RCS_RCOP, RCS_RCS_LID1, RCS_RCS_LID4, RCS_RRTI, RECEIVE_COPY_STATUS, scsi_vpd_tpc_descriptor_rtf::remote_tokens, scsi_vpd_tpc_descriptor_srtd::rod_type, ROD_TYPE_AUR, ROD_TYPE_BLOCK_ZERO, scsi_vpd_tpc_descriptor_srt::rod_type_descriptors, scsi_vpd_tpc_descriptor_srt::rod_type_descriptors_length, scsi_vpd_tpc_descriptor_sc_descr::sa_length, scsi_2btoul(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, scsi_vpd_tpc_descriptor_sd::supported_descriptor_codes, scsi_vpd_tpc_descriptor_sdid::supported_descriptor_ids, scsi_vpd_tpc_descriptor_sc_descr::supported_service_actions, SVPD_SCSI_TPC, SVPD_TPC_BDRL, SVPD_TPC_GCO, SVPD_TPC_PD, SVPD_TPC_RTF, SVPD_TPC_RTF_BLOCK, SVPD_TPC_SC, SVPD_TPC_SD, SVPD_TPC_SDID, SVPD_TPC_SRT, SVPD_TPC_SRTD_TIN, SVPD_TPC_SRTD_TOUT, T_DIRECT, scsi_vpd_tpc_descriptor_gco::total_concurrent_copies, TPC_DFL_TOKEN_TIMEOUT, TPC_MAX_CSCDS, TPC_MAX_INLINE, TPC_MAX_IOCHUNK_SIZE, TPC_MAX_LIST, TPC_MAX_LISTS, TPC_MAX_SEG, TPC_MAX_SEGS, TPC_MAX_TOKEN_TIMEOUT, TPC_MIN_TOKEN_TIMEOUT, scsi_vpd_tpc_descriptor_rtf_block::type_format, scsi_vpd_tpc_descriptor_rtf::type_specific_features, and scsi_vpd_tpc_descriptor_rtf::type_specific_features_length.

Referenced by ctl_inquiry_evpd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_log_sense()

◆ ctl_lun_map_deinit()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_lun_map_from_port()

uint32_t ctl_lun_map_from_port ( struct ctl_port port,
uint32_t  plun 
)

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

Here is the caller graph for this function:

◆ ctl_lun_map_init()

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

Here is the call graph for this function:
Here is the caller graph for this function:

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_lun_map_to_port()

uint32_t ctl_lun_map_to_port ( struct ctl_port port,
uint32_t  glun 
)

◆ ctl_lun_map_unset()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_mechanism_status()

◆ ctl_mode_select()

◆ ctl_mode_sense()

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.

Here is the call graph for this function:

◆ ctl_persistent_reserve_in()

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.

Here is the call graph for this function:

◆ ctl_persistent_reserve_out()

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.

Here is the call graph for this function:

◆ ctl_pool_create()

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

Here is the caller graph for this function:

◆ ctl_pool_free()

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

Here is the caller graph for this function:

◆ ctl_populate_token()

int ctl_populate_token ( struct ctl_scsiio ctsio)

Definition at line 2020 of file ctl_tpc.c.

References tpc_token::active, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_be_lun::blocksize, tpc_token::blocksize, ctl_scsiio::cdb, tpc_list::completed, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), CTL_LUN, CTL_PORT, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_lba_out_of_range(), ctl_set_success(), CTL_SOFTC, tpc_list::curbytes, tpc_list::cursectors, tpc_list::curseg, scsi_populate_token_data::desc, EC_PT_RTV, ctl_io_hdr::flags, tpc_list::flags, scsi_populate_token_data::flags, scsi_populate_token_data::inactivity_timeout, tpc_list::init_idx, tpc_list::init_port, 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, tpc_token::last_active, tpc_list::last_active, scsi_populate_token_data::length, scsi_populate_token::length, tpc_list::list_id, scsi_populate_token::list_identifier, ctl_lun::lun, tpc_token::lun, ctl_lun::lun_lock, ctl_be_lun::maxlba, ctl_io_hdr::nexus, tpc_token::nrange, tpc_token::params, tpc_token::range, scsi_populate_token_data::range_descriptor_length, scsi_populate_token_data::rod_type, ROD_TYPE_AUR, scsi_2btoul(), scsi_4btoul(), tpc_list::service_action, scsi_populate_token::service_action, ctl_nexus::targ_port, tpc_token::timeout, tpc_token::token, tpc_check_ranges_l(), tpc_check_ranges_x(), tpc_create_token(), TPC_DFL_TOKEN_TIMEOUT, tpc_find_list(), ctl_softc::tpc_lock, TPC_MAX_SEGS, TPC_MAX_TOKEN_TIMEOUT, TPC_MIN_TOKEN_TIMEOUT, and tpc_ranges_length().

Here is the call graph for this function:

◆ ctl_prevent_allow()

◆ ctl_read_buffer()

◆ ctl_read_capacity()

◆ ctl_read_capacity_16()

◆ ctl_read_defect()

◆ ctl_read_toc()

◆ ctl_read_write()

int ctl_read_write ( struct ctl_scsiio ctsio)

◆ ctl_receive_copy_failure_details()

◆ ctl_receive_copy_operating_parameters()

int ctl_receive_copy_operating_parameters ( struct ctl_scsiio ctsio)

Definition at line 454 of file ctl_tpc.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(), scsi_receive_copy_operating_parameters_data::data_segment_granularity, EC_CSCD_ID, EC_SEG_B2B, EC_SEG_REGISTER_KEY, EC_SEG_VERIFY, ctl_io_hdr::flags, scsi_receive_copy_operating_parameters_data::held_data_granularity, scsi_receive_copy_operating_parameters_data::held_data_limit, scsi_receive_copy_operating_parameters_data::implemented_descriptor_list_length, scsi_receive_copy_operating_parameters_data::inline_data_granularity, 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_receive_copy_operating_parameters::length, scsi_receive_copy_operating_parameters_data::length, scsi_receive_copy_operating_parameters_data::list_of_implemented_descriptor_type_codes, scsi_receive_copy_operating_parameters_data::maximum_concurrent_copies, scsi_receive_copy_operating_parameters_data::maximum_cscd_descriptor_count, scsi_receive_copy_operating_parameters_data::maximum_descriptor_list_length, scsi_receive_copy_operating_parameters_data::maximum_inline_data_length, scsi_receive_copy_operating_parameters_data::maximum_segment_descriptor_count, scsi_receive_copy_operating_parameters_data::maximum_segment_length, scsi_receive_copy_operating_parameters_data::maximum_stream_device_transfer_size, RCOP_SNLID, scsi_4btoul(), scsi_ulto2b(), scsi_ulto4b(), scsi_receive_copy_operating_parameters_data::snlid, scsi_receive_copy_operating_parameters_data::total_concurrent_copies, TPC_MAX_CSCDS, TPC_MAX_INLINE, TPC_MAX_LIST, TPC_MAX_LISTS, TPC_MAX_SEG, and TPC_MAX_SEGS.

Here is the call graph for this function:

◆ ctl_receive_copy_status_lid1()

◆ ctl_receive_copy_status_lid4()

int ctl_receive_copy_status_lid4 ( struct ctl_scsiio ctsio)

Definition at line 650 of file ctl_tpc.c.

References tpc_list::abort, scsi_receive_copy_status_lid4_data::available_data, ctl_scsiio::be_move_done, ctl_scsiio::cdb, tpc_list::completed, scsi_receive_copy_status_lid4_data::copy_command_status, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), tpc_list::curbytes, tpc_list::curops, tpc_list::curseg, tpc_list::error, scsi_receive_copy_status_lid4_data::estimated_status_update_delay, 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_receive_copy_status_lid4::length, scsi_receive_copy_status_lid4_data::length_of_the_sense_data_field, tpc_list::list_id, scsi_receive_copy_status_lid4::list_identifier, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, scsi_receive_copy_status_lid4_data::operation_counter, RCS_CCS_ABORTED, RCS_CCS_COMPLETED, RCS_CCS_ERROR, RCS_CCS_INPROG_FG, RCS_TC_BYTES, scsi_receive_copy_status_lid4_data::response_to_service_action, scsi_4btoul(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), scsi_receive_copy_status_lid4_data::segments_processed, scsi_receive_copy_status_lid4_data::sense_data, scsi_receive_copy_status_lid4_data::sense_data_length, tpc_list::service_action, tpc_find_list(), scsi_receive_copy_status_lid4_data::transfer_count, and scsi_receive_copy_status_lid4_data::transfer_count_units.

Here is the call graph for this function:

◆ ctl_receive_rod_token_information()

int ctl_receive_rod_token_information ( struct ctl_scsiio ctsio)

Definition at line 2338 of file ctl_tpc.c.

References tpc_list::abort, scsi_receive_copy_status_lid4_data::available_data, ctl_scsiio::be_move_done, ctl_scsiio::cdb, tpc_list::completed, scsi_receive_copy_status_lid4_data::copy_command_status, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_success(), tpc_list::curops, tpc_list::cursectors, tpc_list::curseg, tpc_list::error, scsi_receive_copy_status_lid4_data::estimated_status_update_delay, 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_receive_rod_token_information::length, scsi_receive_copy_status_lid4_data::length_of_the_sense_data_field, tpc_list::list_id, scsi_receive_rod_token_information::list_identifier, ctl_lun::lun, ctl_lun::lun_lock, ctl_io_hdr::nexus, scsi_receive_copy_status_lid4_data::operation_counter, RCS_CCS_ABORTED, RCS_CCS_COMPLETED, RCS_CCS_ERROR, RCS_CCS_INPROG_FG, RCS_TC_LBAS, scsi_receive_copy_status_lid4_data::response_to_service_action, scsi_4btoul(), scsi_u64to8b(), scsi_ulto2b(), scsi_ulto4b(), scsi_receive_copy_status_lid4_data::segments_processed, scsi_receive_copy_status_lid4_data::sense_data, scsi_receive_copy_status_lid4_data::sense_data_length, tpc_list::service_action, tpc_find_list(), scsi_receive_copy_status_lid4_data::transfer_count, and scsi_receive_copy_status_lid4_data::transfer_count_units.

Here is the call graph for this function:

◆ ctl_report_all_rod_tokens()

◆ ctl_report_ident_info()

◆ ctl_report_luns()

◆ ctl_report_supported_opcodes()

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.

Here is the call graph for this function:

◆ ctl_report_supported_tmf()

◆ ctl_report_tagret_port_groups()

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.

Here is the call graph for this function:

◆ ctl_report_timestamp()

◆ ctl_request_sense()

◆ ctl_scsi_release()

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.

Here is the call graph for this function:

◆ ctl_scsi_reserve()

int ctl_scsi_reserve ( struct ctl_scsiio ctsio)

◆ ctl_start_stop()

◆ ctl_sync_cache()

◆ ctl_tpc_init()

void ctl_tpc_init ( struct ctl_softc softc)

Definition at line 194 of file ctl_tpc.c.

References ctl_softc::ctl_lock, ctl_softc::tpc_lock, ctl_softc::tpc_timeout, and tpc_timeout().

Referenced by ctl_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ctl_tpc_lun_clear()

void ctl_tpc_lun_clear ( struct ctl_lun lun,
uint32_t  initidx 
)

Definition at line 230 of file ctl_tpc.c.

References tpc_list::completed, and tpc_list::init_idx.

Referenced by ctl_do_lun_reset(), and ctl_i_t_nexus_loss().

Here is the caller graph for this function:

◆ ctl_tpc_lun_init()

void ctl_tpc_lun_init ( struct ctl_lun lun)

Definition at line 223 of file ctl_tpc.c.

References tpc_token::lun.

Referenced by ctl_add_lun().

Here is the caller graph for this function:

◆ ctl_tpc_lun_shutdown()

void ctl_tpc_lun_shutdown ( struct ctl_lun lun)

Definition at line 245 of file ctl_tpc.c.

References tpc_list::completed, ctl_lun::ctl_softc, tpc_token::lun, tpc_token::token, and ctl_softc::tpc_lock.

Referenced by ctl_free_lun().

Here is the caller graph for this function:

◆ ctl_tpc_shutdown()

void ctl_tpc_shutdown ( struct ctl_softc softc)

Definition at line 205 of file ctl_tpc.c.

References tpc_token::token, ctl_softc::tpc_lock, and ctl_softc::tpc_timeout.

Referenced by ctl_shutdown().

Here is the caller graph for this function:

◆ ctl_tur()

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

Here is the call graph for this function:

◆ ctl_unmap()

◆ ctl_verify()

◆ ctl_write_buffer()

◆ ctl_write_same()

◆ ctl_write_using_token()

int ctl_write_using_token ( struct ctl_scsiio ctsio)

Definition at line 2184 of file ctl_tpc.c.

References tpc_token::active, ctl_lun::be_lun, ctl_scsiio::be_move_done, ctl_scsiio::cdb, tpc_list::completed, ctl_config_move_done(), ctl_datamove(), CTL_DEBUG_PRINT, ctl_done(), CTL_FLAG_ALLOCATED, ctl_get_initindex(), CTL_LUN, CTL_RETVAL_COMPLETE, ctl_set_invalid_field(), ctl_set_lba_out_of_range(), ctl_set_sense(), CTL_SOFTC, scsi_write_using_token_data::desc, EC_WUT_DEL_TKN, ctl_io_hdr::flags, tpc_list::flags, scsi_write_using_token_data::flags, tpc_list::init_idx, tpc_list::init_port, 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_using_token_data::length, scsi_write_using_token::length, tpc_list::list_id, scsi_write_using_token::list_identifier, ctl_lun::lun, ctl_lun::lun_lock, ctl_be_lun::maxlba, ctl_io_hdr::nexus, tpc_list::nrange, tpc_list::offset_into_rod, scsi_write_using_token_data::offset_into_rod, tpc_list::params, tpc_list::range, scsi_write_using_token_data::range_descriptor_length, scsi_write_using_token_data::rod_token, ROD_TYPE_BLOCK_ZERO, scsi_2btoul(), scsi_4btoul(), scsi_8btou64(), tpc_list::service_action, scsi_write_using_token::service_action, SSD_ELEM_NONE, SSD_KEY_ILLEGAL_REQUEST, ctl_nexus::targ_port, tpc_token::timeout, tpc_token::token, tpc_list::token, tpc_check_ranges_l(), tpc_check_ranges_x(), tpc_find_list(), ctl_softc::tpc_lock, TPC_MAX_SEGS, and tpc_process().

Here is the call graph for this function:

Variable Documentation

◆ ctl_cmd_table

const struct ctl_cmd_entry ctl_cmd_table[256]
extern

Definition at line 905 of file ctl_cmd_table.c.

Referenced by ctl_get_cmd_entry(), and ctl_report_supported_opcodes().

◆ log_page_index_template

const struct ctl_page_index log_page_index_template[]
static
Initial value:
= {
CTL_PAGE_FLAG_ALL, NULL, NULL},
CTL_PAGE_FLAG_ALL, NULL, NULL},
{SLS_TEMPERATURE, 0, 0, NULL,
{SLS_STAT_AND_PERF, 0, 0, NULL,
{SLS_IE_PAGE, 0, 0, NULL,
}
int ctl_lbp_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)
Definition: ctl.c:6764
int ctl_ie_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)
Definition: ctl.c:6881
int ctl_sap_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)
Definition: ctl.c:6832
int ctl_temp_log_sense_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, int pc)
Definition: ctl.c:6730
@ CTL_PAGE_FLAG_ALL
Definition: ctl_private.h:242
@ CTL_PAGE_FLAG_DIRECT
Definition: ctl_private.h:239
#define SLS_IE_PAGE
Definition: scsi_all.h:588
#define SLS_SUPPORTED_SUBPAGES_SUBPAGE
Definition: scsi_all.h:595
#define SLS_SUPPORTED_PAGES_PAGE
Definition: scsi_all.h:575
#define SLS_LOGICAL_BLOCK_PROVISIONING
Definition: scsi_all.h:583
#define SLS_TEMPERATURE
Definition: scsi_all.h:584
#define SLS_STAT_AND_PERF
Definition: scsi_all.h:587

Definition at line 326 of file ctl_private.h.

Referenced by ctl_init_log_page_index().

◆ page_index_template

const struct ctl_page_index page_index_template[]
static
Initial value:
= {
{SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL,
CTL_PAGE_FLAG_DIRECT, NULL, NULL},
{SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL,
CTL_PAGE_FLAG_DIRECT, NULL, NULL},
{SMS_CACHING_PAGE, 0, sizeof(struct scsi_caching_page), NULL,
{SMS_CONTROL_MODE_PAGE, 0, sizeof(struct scsi_control_page), NULL,
sizeof(struct scsi_control_ext_page), NULL,
sizeof(struct scsi_cddvd_capabilities_page), NULL,
CTL_PAGE_FLAG_CDROM, NULL, NULL},
}
int ctl_ie_page_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr)
Definition: ctl.c:5987
int ctl_default_page_handler(struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr)
Definition: ctl.c:5932
@ CTL_PAGE_FLAG_CDROM
Definition: ctl_private.h:241
#define SMS_CACHING_PAGE
Definition: scsi_all.h:781
#define SMS_INFO_EXCEPTIONS_PAGE
Definition: scsi_all.h:201
#define SMS_CONTROL_MODE_PAGE
Definition: scsi_all.h:199
#define SMPH_SPF
Definition: scsi_all.h:3665
#define SMS_FORMAT_DEVICE_PAGE
Definition: scsi_all.h:195
#define SMS_CDDVD_CAPS_PAGE
Definition: scsi_cd.h:802
#define SMS_RW_ERROR_RECOVERY_PAGE
Definition: scsi_da.h:610
#define SMS_VERIFY_ERROR_RECOVERY_PAGE
Definition: scsi_da.h:634
#define SMS_RIGID_DISK_PAGE
Definition: scsi_da.h:589

Definition at line 271 of file ctl_private.h.

Referenced by ctl_init_page_index().