FreeBSD kernel CAM code
|
Go to the source code of this file.
Data Structures | |
struct | ctl_port_entry |
struct | ctl_modepage_header |
union | ctl_modepage_info |
Macros | |
#define | CTL_RETVAL_COMPLETE 0 |
#define | CTL_RETVAL_QUEUED 1 |
#define | CTL_RETVAL_ALLOCATED 2 |
#define | CTL_RETVAL_ERROR 3 |
#define | CTL_PORT_WWNN_VALID 0x01 |
#define | CTL_PORT_WWPN_VALID 0x02 |
#define | CTL_SN_LEN 16 |
#define | CTL_DEVID_LEN 64 |
#define | CTL_DEVID_MIN_LEN 16 |
#define | CTL_WWPN_LEN 8 |
#define | CTL_DRIVER_NAME_LEN 32 |
Enumerations | |
enum | ctl_port_type { CTL_PORT_NONE = 0x00 , CTL_PORT_FC = 0x01 , CTL_PORT_SCSI = 0x02 , CTL_PORT_IOCTL = 0x04 , CTL_PORT_INTERNAL = 0x08 , CTL_PORT_ISCSI = 0x10 , CTL_PORT_SAS = 0x20 , CTL_PORT_UMASS = 0x40 , CTL_PORT_ALL = 0xff , CTL_PORT_ISC = 0x100 } |
enum | ctl_ua_type { CTL_UA_NONE = 0x0000 , CTL_UA_POWERON = 0x0001 , CTL_UA_BUS_RESET = 0x0002 , CTL_UA_TARG_RESET = 0x0004 , CTL_UA_I_T_NEXUS_LOSS = 0x0008 , CTL_UA_LUN_RESET = 0x0010 , CTL_UA_LUN_CHANGE = 0x0020 , CTL_UA_MODE_CHANGE = 0x0040 , CTL_UA_LOG_CHANGE = 0x0080 , CTL_UA_INQ_CHANGE = 0x0100 , CTL_UA_RES_PREEMPT = 0x0400 , CTL_UA_RES_RELEASE = 0x0800 , CTL_UA_REG_PREEMPT = 0x1000 , CTL_UA_ASYM_ACC_CHANGE = 0x2000 , CTL_UA_CAPACITY_CHANGE = 0x4000 , CTL_UA_THIN_PROV_THRES = 0x8000 , CTL_UA_MEDIUM_CHANGE = 0x10000 , CTL_UA_IE = 0x20000 } |
Functions | |
MALLOC_DECLARE (M_CTL) | |
int | ctl_sbuf_printf_esc (struct sbuf *sb, char *str, int size) |
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_default_page_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) |
int | ctl_ie_page_handler (struct ctl_scsiio *ctsio, struct ctl_page_index *page_index, uint8_t *page_ptr) |
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_config_move_done (union ctl_io *io, bool samethr) |
void | ctl_datamove_done (union ctl_io *io, bool samethr) |
void | ctl_datamove (union ctl_io *io) |
void | ctl_serseq_done (union ctl_io *io) |
void | ctl_done (union ctl_io *io) |
void | ctl_data_submit_done (union ctl_io *io) |
void | ctl_config_read_done (union ctl_io *io) |
void | ctl_config_write_done (union ctl_io *io) |
void | ctl_portDB_changed (int portnum) |
int | ctl_ioctl_io (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) |
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) |
uint32_t | ctl_decode_lun (uint64_t encoded) |
uint64_t | ctl_encode_lun (uint32_t decoded) |
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) |
int | ctl_expand_number (const char *buf, uint64_t *num) |
enum ctl_port_type |
enum ctl_ua_type |
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().
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().
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().
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().
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().
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().
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().
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().
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_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.
int ctl_ioctl_io | ( | struct cdev * | dev, |
u_long | cmd, | ||
caddr_t | addr, | ||
int | flag, | ||
struct thread * | td | ||
) |
Definition at line 590 of file ctl_frontend_ioctl.c.
References cfi_submit_wait(), ctl_alloc_io(), CTL_FLAG_USER_REQ, ctl_free_io(), CTL_IO, CTL_IO_SCSI, CTL_PORT_STATUS_ONLINE, CTL_SOFTC, CTL_STATUS_NONE, CTL_TAG_UNTAGGED, ctl_io_hdr::flags, ctl_io::io_hdr, ctl_io_hdr::io_type, ctl_io_hdr::nexus, ctl_io_hdr::pool, ctl_io::scsiio, ctl_io_hdr::status, ctl_scsiio::tag_num, ctl_scsiio::tag_type, and ctl_nexus::targ_port.
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().
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.
void ctl_portDB_changed | ( | int | portnum | ) |
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().
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().
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.
MALLOC_DECLARE | ( | M_CTL | ) |