FreeBSD kernel CAM code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ctype.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
#include <sys/queue.h>
#include <sys/sbuf.h>
#include <sys/sx.h>
#include <sys/systm.h>
#include <sys/types.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
#include <cam/cam_xpt_periph.h>
#include <cam/cam_periph.h>
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_enc.h>
#include <cam/scsi/scsi_enc_internal.h>
Go to the source code of this file.
Data Structures | |
struct | ses_type |
struct | ses_comstat |
union | ses_addl_data |
struct | ses_addl_status |
struct | ses_element |
struct | ses_control_request |
struct | ses_iterator |
Structure encapsulating all data necessary to traverse the elements of a SES configuration. More... | |
struct | ses_cache |
struct | ses_softc |
struct | ses_path_iter_args |
struct | ses_setphyspath_callback_args |
Macros | |
#define | SCSZ 0x8000 |
#define | SES_FLAG_TIMEDCOMP 0x01 |
#define | SES_FLAG_ADDLSTATUS 0x02 |
#define | SES_FLAG_DESC 0x04 |
#define | SES_PRINT_PORTS(p, type) |
Typedefs | |
typedef struct ses_type | ses_type_t |
typedef struct ses_comstat | ses_comstat_t |
typedef union ses_addl_data | ses_add_data_t |
typedef struct ses_addl_status | ses_add_status_t |
typedef struct ses_element | ses_element_t |
typedef struct ses_control_request | ses_control_request_t |
typedef struct ses_control_reqlist | ses_control_reqlist_t |
typedef struct ses_cache | ses_cache_t |
typedef struct ses_softc | ses_softc_t |
typedef void | ses_devid_callback_t(enc_softc_t *, enc_element_t *, struct scsi_vpd_id_descriptor *, void *) |
typedef void | ses_path_callback_t(enc_softc_t *, enc_element_t *, struct cam_path *, void *) |
typedef struct ses_path_iter_args | ses_path_iter_args_t |
typedef struct ses_setphyspath_callback_args | ses_setphyspath_callback_args_t |
Functions | |
__FBSDID ("$FreeBSD$") | |
TAILQ_HEAD (ses_control_reqlist, ses_control_request) | |
static void | ses_terminate_control_requests (ses_control_reqlist_t *reqlist, int result) |
SYSCTL_INT (_kern_cam_enc, OID_AUTO, search_globally, CTLFLAG_RWTUN, &ses_search_globally, 0, "Search for disks on other buses") | |
static void | ses_iter_reset (struct ses_iterator *iter) |
Reset a SES iterator to just before the first element in the configuration. More... | |
static void | ses_iter_init (enc_softc_t *enc, enc_cache_t *cache, struct ses_iterator *iter) |
Initialize the storage of a SES iterator and reset it to the position just before the first element of the configuration. More... | |
static enc_element_t * | ses_iter_next (struct ses_iterator *iter) |
Traverse the provided SES iterator to the next element within the configuration. More... | |
static enc_element_t * | ses_iter_seek_to (struct ses_iterator *iter, int element_index, ses_elem_index_type_t index_type) |
Move the provided iterator forwards or backwards to the object having the give index. More... | |
static int | ses_set_timed_completion (enc_softc_t *enc, uint8_t tc_en) |
Discover whether this instance supports timed completion of a RECEIVE DIAGNOSTIC RESULTS command requesting the Enclosure Status page, and store the result in the softc, updating if necessary. More... | |
static void | ses_poll_status (enc_softc_t *) |
static void | ses_print_addl_data (enc_softc_t *enc, enc_element_t *obj) |
Print the additional element status data for this object. More... | |
static void | ses_cache_free_elm_addlstatus (enc_softc_t *enc, enc_cache_t *cache) |
static void | ses_cache_free_elm_descs (enc_softc_t *enc, enc_cache_t *cache) |
static void | ses_cache_free_status (enc_softc_t *enc, enc_cache_t *cache) |
static void | ses_cache_free_elm_map (enc_softc_t *enc, enc_cache_t *cache) |
static void | ses_cache_free (enc_softc_t *enc, enc_cache_t *cache) |
static void | ses_cache_clone (enc_softc_t *enc, enc_cache_t *src, enc_cache_t *dst) |
int | ses_elm_sas_descr_type (union ses_elm_sas_hdr *obj) |
int | ses_elm_addlstatus_proto (struct ses_elm_addlstatus_base_hdr *hdr) |
int | ses_elm_addlstatus_eip (struct ses_elm_addlstatus_base_hdr *hdr) |
int | ses_elm_addlstatus_invalid (struct ses_elm_addlstatus_base_hdr *hdr) |
int | ses_elm_sas_type0_not_all_phys (union ses_elm_sas_hdr *hdr) |
int | ses_elm_sas_dev_phy_sata_dev (struct ses_elm_sas_device_phy *phy) |
int | ses_elm_sas_dev_phy_sata_port (struct ses_elm_sas_device_phy *phy) |
int | ses_elm_sas_dev_phy_dev_type (struct ses_elm_sas_device_phy *phy) |
static int | ses_config_cache_valid (ses_cache_t *ses_cache, const uint8_t *gen_code) |
Verify that the cached configuration data in our softc is valid for processing the page data corresponding to the provided page header. More... | |
static void | ses_devids_iter (enc_softc_t *enc, enc_element_t *elm, ses_devid_callback_t *callback, void *callback_arg) |
Iterate over and create vpd device id records from the additional element status data for elm, passing that data to the provided callback. More... | |
static void | ses_path_iter_devid_callback (enc_softc_t *enc, enc_element_t *elem, struct scsi_vpd_id_descriptor *devid, void *arg) |
static void | ses_paths_iter (enc_softc_t *enc, enc_element_t *elm, ses_path_callback_t *callback, void *callback_arg) |
Iterate over and find the matching periph objects for the specified element. More... | |
static void | ses_elmdevname_callback (enc_softc_t *enc, enc_element_t *elem, struct cam_path *path, void *arg) |
static void | ses_setphyspath_callback (enc_softc_t *enc, enc_element_t *elm, struct cam_path *path, void *arg) |
ses_paths_iter() callback to set the physical path on the CAM EDT entries corresponding to a given SES element. More... | |
static int | ses_set_physpath (enc_softc_t *enc, enc_element_t *elm, struct ses_iterator *iter) |
Set a device's physical path string in CAM XPT. More... | |
static void | ses_page_cdb (char *cdb, int bufsiz, SesDiagPageCodes pagenum, int dir) |
Helper to set the CDB fields appropriately. More... | |
static int | ses_process_pages (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Process the list of supported pages and update flags. More... | |
static int | ses_process_config (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Process the config page and update associated structures. More... | |
static int | ses_process_status (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Update the status page and associated structures. More... | |
static ses_addlstatus_avail_t | ses_typehasaddlstatus (enc_softc_t *enc, uint8_t typidx) |
Check to see whether a given type (as obtained via type headers) is supported by the additional status command. More... | |
static int | ses_get_elm_addlstatus_fc (enc_softc_t *, enc_cache_t *, uint8_t *, int) |
static int | ses_get_elm_addlstatus_sas (enc_softc_t *enc, enc_cache_t *enc_cache, uint8_t *buf, int bufsiz, int eip, int tidx, int nobj) |
Update the softc with the additional element status data for this object, for SAS objects. More... | |
static int | ses_get_elm_addlstatus_ata (enc_softc_t *enc, enc_cache_t *enc_cache, uint8_t *buf, int bufsiz, int eip, int tidx, int nobj) |
Update the softc with the additional element status data for this object, for ATA objects. More... | |
static int | ses_process_elm_addlstatus (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Parse the additional status element data for each object. More... | |
static int | ses_process_control_request (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
static int | ses_publish_physpaths (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
static int | ses_publish_cache (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
static const char * | ses_sanitize_elm_desc (const char *desc, uint16_t *len) |
static int | ses_process_elm_descs (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Parse the descriptors for each object. More... | |
static int | ses_fill_rcv_diag_io (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t *buf) |
static int | ses_encode (enc_softc_t *enc, uint8_t *buf, int amt, ses_control_request_t *req) |
Encode the object status into the response buffer, which is expected to contain the current enclosure status. This function turns off all the 'select' bits for the objects except for the object specified, then sends it back to the enclosure. More... | |
static int | ses_fill_control_request (enc_softc_t *enc, struct enc_fsm_state *state, union ccb *ccb, uint8_t *buf) |
static void | ses_print_addl_data_sas_type0 (char *sesname, struct sbuf *sbp, enc_element_t *obj) |
Print the additional element status data for this object, for SAS type 0 objects. See SES2 r20 Section 6.1.13.3.2. More... | |
static void | ses_print_addl_data_sas_type1 (char *sesname, struct sbuf *sbp, enc_element_t *obj) |
Print the additional element status data for this object, for SAS type 1 objects. See SES2 r20 Sections 6.1.13.3.3 and 6.1.13.3.4. More... | |
static void | ses_print_addl_data_ata (struct sbuf *sbp, enc_element_t *obj) |
Print the additional element status data for this object, for ATA objects. More... | |
static int | ses_get_elm_addlstatus_sas_type0 (enc_softc_t *enc, enc_cache_t *enc_cache, uint8_t *buf, int bufsiz, int eip, int nobj) |
Update the softc with the additional element status data for this object, for SAS type 0 objects. More... | |
static int | ses_get_elm_addlstatus_sas_type1 (enc_softc_t *enc, enc_cache_t *enc_cache, uint8_t *buf, int bufsiz, int eip, int nobj) |
Update the softc with the additional element status data for this object, for SAS type 1 objects. More... | |
static void | ses_softc_invalidate (enc_softc_t *enc) |
static void | ses_softc_cleanup (enc_softc_t *enc) |
static int | ses_init_enc (enc_softc_t *enc) |
static int | ses_set_enc_status (enc_softc_t *enc, uint8_t encstat, int slpflag) |
static int | ses_get_elm_status (enc_softc_t *enc, encioc_elm_status_t *elms, int slpflag) |
static int | ses_set_elm_status (enc_softc_t *enc, encioc_elm_status_t *elms, int slpflag) |
static int | ses_get_elm_desc (enc_softc_t *enc, encioc_elm_desc_t *elmd) |
static int | ses_get_elm_devnames (enc_softc_t *enc, encioc_elm_devnames_t *elmdn) |
Respond to ENCIOC_GETELMDEVNAME, providing a device name for the given object id if one is available. More... | |
static int | ses_handle_string (enc_softc_t *enc, encioc_string_t *sstr, unsigned long ioc) |
Send a string to the primary subenclosure using the String Out SES diagnostic page. More... | |
static void | ses_device_found (enc_softc_t *enc) |
Notification received when CAM detects a new device in the SCSI domain in which this SEP resides. More... | |
int | ses_softc_init (enc_softc_t *enc) |
Initialize a new SES instance. More... | |
Variables | |
static enc_softc_cleanup_t | ses_softc_cleanup |
static fsm_fill_handler_t | ses_fill_rcv_diag_io |
static fsm_fill_handler_t | ses_fill_control_request |
static fsm_done_handler_t | ses_process_pages |
static fsm_done_handler_t | ses_process_config |
static fsm_done_handler_t | ses_process_status |
static fsm_done_handler_t | ses_process_elm_descs |
static fsm_done_handler_t | ses_process_elm_addlstatus |
static fsm_done_handler_t | ses_process_control_request |
static fsm_done_handler_t | ses_publish_physpaths |
static fsm_done_handler_t | ses_publish_cache |
static struct enc_fsm_state | enc_fsm_states [SES_NUM_UPDATE_STATES] |
static int | ses_search_globally = 0 |
static struct enc_vec | ses_enc_vec |
Structures and routines specific && private to SES only
Definition in file scsi_enc_ses.c.
#define SCSZ 0x8000 |
Definition at line 256 of file scsi_enc_ses.c.
#define SES_FLAG_ADDLSTATUS 0x02 |
Definition at line 370 of file scsi_enc_ses.c.
#define SES_FLAG_DESC 0x04 |
Definition at line 371 of file scsi_enc_ses.c.
#define SES_FLAG_TIMEDCOMP 0x01 |
Definition at line 369 of file scsi_enc_ses.c.
#define SES_PRINT_PORTS | ( | p, | |
type | |||
) |
Definition at line 2270 of file scsi_enc_ses.c.
typedef union ses_addl_data ses_add_data_t |
typedef struct ses_addl_status ses_add_status_t |
typedef struct ses_cache ses_cache_t |
typedef struct ses_comstat ses_comstat_t |
typedef struct ses_control_reqlist ses_control_reqlist_t |
Definition at line 124 of file scsi_enc_ses.c.
typedef struct ses_control_request ses_control_request_t |
typedef void ses_devid_callback_t(enc_softc_t *, enc_element_t *, struct scsi_vpd_id_descriptor *, void *) |
Function signature for consumers of the ses_devids_iter() interface.
Definition at line 803 of file scsi_enc_ses.c.
typedef struct ses_element ses_element_t |
typedef void ses_path_callback_t(enc_softc_t *, enc_element_t *, struct cam_path *, void *) |
Function signature for consumers of the ses_paths_iter() interface.
Definition at line 854 of file scsi_enc_ses.c.
typedef struct ses_path_iter_args ses_path_iter_args_t |
Argument package passed through ses_devids_iter() by ses_paths_iter() to ses_path_iter_devid_callback().
typedef struct ses_setphyspath_callback_args ses_setphyspath_callback_args_t |
Argument package passed through ses_paths_iter() to ses_getcampath_callback.
typedef struct ses_softc ses_softc_t |
typedef struct ses_type ses_type_t |
anonymous enum |
Enumerator | |
---|---|
SES_SETSTATUS_ENC_IDX |
Definition at line 125 of file scsi_enc_ses.c.
Definition at line 1641 of file scsi_enc_ses.c.
Element index types tracked by a SES iterator.
Definition at line 489 of file scsi_enc_ses.c.
Enumerator | |
---|---|
ITERATOR_INDEX_INVALID | Value of an initialized but invalid index in a ses_iterator object. This value is used for the individual_element_index of overal status elements and for all index types when an iterator is first initialized. |
ITERATOR_INDEX_END | Value of an index in a ses_iterator object when the iterator has traversed past the last valid element.. |
Definition at line 141 of file scsi_enc_ses.c.
enum ses_update_action |
Definition at line 241 of file scsi_enc_ses.c.
enum SesDiagPageCodes |
Definition at line 65 of file scsi_enc_ses.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 690 of file scsi_enc_ses.c.
References enc_cache::elm_map, enc_element::elm_private, enc_cache::nelms, enc_cache::private, and ses_cache_free().
Referenced by ses_publish_cache().
|
static |
Definition at line 660 of file scsi_enc_ses.c.
References ses_cache::cfg_page, ENC_DLOG, ENC_FREE, enc_other_cache(), enc_cache::private, ses_cache_free_elm_addlstatus(), ses_cache_free_elm_map(), ses_cache_free_status(), ses_cache::ses_ntypes, ses_cache::ses_types, and ses_cache::subencs.
Referenced by ses_cache_clone(), ses_process_config(), ses_process_status(), and ses_softc_cleanup().
|
static |
Definition at line 560 of file scsi_enc_ses.c.
References ses_element::addl, ses_cache::elm_addlstatus_page, enc_cache::elm_map, enc_element::elm_private, ENC_DLOG, ENC_FREE, enc_other_cache(), enc_cache::nelms, and enc_cache::private.
Referenced by ses_cache_free(), ses_cache_free_elm_map(), and ses_process_elm_addlstatus().
|
static |
Definition at line 591 of file scsi_enc_ses.c.
References ses_element::descr, ses_element::descr_len, ses_cache::elm_descs_page, enc_cache::elm_map, enc_element::elm_private, ENC_DLOG, ENC_FREE, enc_other_cache(), enc_cache::nelms, and enc_cache::private.
Referenced by ses_cache_free_elm_map(), and ses_process_elm_descs().
|
static |
Definition at line 638 of file scsi_enc_ses.c.
References enc_cache::elm_map, enc_element::elm_private, ENC_DLOG, ENC_FREE_AND_NULL, enc_cache::nelms, ses_cache_free_elm_addlstatus(), and ses_cache_free_elm_descs().
Referenced by ses_cache_free().
|
static |
Definition at line 621 of file scsi_enc_ses.c.
References ENC_DLOG, ENC_FREE, enc_other_cache(), enc_cache::private, and ses_cache::status_page.
Referenced by ses_cache_free(), and ses_process_status().
|
static |
Verify that the cached configuration data in our softc is valid for processing the page data corresponding to the provided page header.
ses_cache | The SES cache to validate. |
gen_code | The 4 byte generation code from a SES diagnostic page header. |
Definition at line 787 of file scsi_enc_ses.c.
References ses_cache::cfg_page, ses_page_hdr::gen_code, ses_cfg_page::hdr, and scsi_4btoul().
Referenced by ses_process_config(), ses_process_elm_addlstatus(), ses_process_elm_descs(), and ses_process_status().
|
static |
Notification received when CAM detects a new device in the SCSI domain in which this SEP resides.
enc | SES enclosure instance. |
Definition at line 2978 of file scsi_enc_ses.c.
References enc_update_request(), ses_poll_status(), and SES_PUBLISH_PHYSPATHS.
|
static |
Iterate over and create vpd device id records from the additional element status data for elm, passing that data to the provided callback.
enc | SES instance containing elm |
elm | Element for which to extract device ID data. |
callback | The callback function to invoke on each generated device id descriptor for elm. |
callback_arg | Argument passed through to callback on each invocation. |
Definition at line 818 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_sas_hdr::base_hdr, enc_element::elm_private, scsi_vpd_id_descriptor::id_type, scsi_vpd_id_descriptor::identifier, scsi_vpd_id_descriptor::length, ses_elm_sas_base_hdr::num_phys, ses_elm_sas_device_phy::phy_addr, scsi_vpd_id_descriptor::proto_codeset, ses_addl_status::proto_data, ses_addl_status::proto_hdr, scsi_vpd_id_descriptor::reserved, ses_addl_status::sas, ses_addl_data::sasdev_phys, SCSI_PROTO_SAS, SVPD_DEVICE_ID_DESC_HDR_LEN, SVPD_ID_ASSOC_PORT, SVPD_ID_CODESET_BINARY, SVPD_ID_PIV, SVPD_ID_PROTO_SHIFT, and SVPD_ID_TYPE_NAA.
Referenced by ses_paths_iter().
int ses_elm_addlstatus_eip | ( | struct ses_elm_addlstatus_base_hdr * | hdr | ) |
Definition at line 745 of file scsi_enc_ses.c.
Referenced by ses_print_addl_data_sas_type0(), and ses_process_elm_addlstatus().
int ses_elm_addlstatus_invalid | ( | struct ses_elm_addlstatus_base_hdr * | hdr | ) |
Definition at line 750 of file scsi_enc_ses.c.
Referenced by ses_process_elm_addlstatus().
int ses_elm_addlstatus_proto | ( | struct ses_elm_addlstatus_base_hdr * | hdr | ) |
Definition at line 740 of file scsi_enc_ses.c.
Referenced by ses_paths_iter(), ses_print_addl_data(), and ses_process_elm_addlstatus().
int ses_elm_sas_descr_type | ( | union ses_elm_sas_hdr * | obj | ) |
Definition at line 735 of file scsi_enc_ses.c.
Referenced by ses_get_elm_addlstatus_sas(), and ses_print_addl_data().
int ses_elm_sas_dev_phy_dev_type | ( | struct ses_elm_sas_device_phy * | phy | ) |
Definition at line 770 of file scsi_enc_ses.c.
Referenced by ses_print_addl_data_sas_type0().
int ses_elm_sas_dev_phy_sata_dev | ( | struct ses_elm_sas_device_phy * | phy | ) |
Definition at line 760 of file scsi_enc_ses.c.
Referenced by ses_print_addl_data_sas_type0().
int ses_elm_sas_dev_phy_sata_port | ( | struct ses_elm_sas_device_phy * | phy | ) |
Definition at line 765 of file scsi_enc_ses.c.
int ses_elm_sas_type0_not_all_phys | ( | union ses_elm_sas_hdr * | hdr | ) |
Definition at line 755 of file scsi_enc_ses.c.
Referenced by ses_print_addl_data_sas_type0().
|
static |
ses_paths_iter() callback function used by ses_get_elmdevname() to record periph driver instance strings corresponding to a SES element.
enc | SES instance containing elm |
elm | Element on which periph matching is active. |
periph | A periph instance that matches elm. |
arg | Argument passed through to callback on each invocation. |
Definition at line 1009 of file scsi_enc_ses.c.
References cam_periph_list().
Referenced by ses_get_elm_devnames(), and ses_print_addl_data().
|
static |
Encode the object status into the response buffer, which is expected to contain the current enclosure status. This function turns off all the 'select' bits for the objects except for the object specified, then sends it back to the enclosure.
enc | SES enclosure the change is being applied to. |
buf | Buffer containing the current enclosure status response. |
amt | Length of the response in the buffer. |
req | The control request to be applied to buf. |
Definition at line 2151 of file scsi_enc_ses.c.
References ses_comstat::comstat, ses_comstat::comstatus, ses_control_page_hdr::control_flags, ses_control_request::elm_idx, ses_control_request::elm_stat, enc_softc::enc_cache, ENC_DLOG, ses_iterator::global_element_index, SES_ELEM_INDEX_GLOBAL, ses_iter_init(), ses_iter_seek_to(), SES_SET_STATUS_MASK, and ses_iterator::type_index.
|
static |
Definition at line 2197 of file scsi_enc_ses.c.
References ses_control_page_hdr::control_flags, enc_softc::enc_daemon_cache, enc_softc::enc_private, ses_status_page::hdr, enc_cache::private, ses_page_length(), ses_softc::ses_pending_requests, ses_softc::ses_requests, ses_terminate_control_requests(), and ses_cache::status_page.
|
static |
Definition at line 2119 of file scsi_enc_ses.c.
References ccb::ataio, enc_fsm_state::buf_size, ccb::csio, ENC_SEMB_SES, enc_softc::enc_type, MSG_SIMPLE_Q_TAG, enc_fsm_state::page_code, scsi_receive_diagnostic_results(), semb_receive_diagnostic_results(), SSD_FULL_SIZE, and enc_fsm_state::timeout.
|
static |
Update the softc with the additional element status data for this object, for ATA objects.
enc | SES softc to be updated. |
buf | The additional element status response buffer. |
bufsiz | Size of the response buffer. |
eip | The EIP bit value. |
tidx | Type index for this object. |
nobj | Number of objects attached to the SES softc. |
Definition at line 2695 of file scsi_enc_ses.c.
References enc_cache::elm_map, enc_element::elm_private, ELMTYP_ARRAY_DEV, ELMTYP_DEVICE, ENC_VLOG, ses_elm_type_desc::etype_elm_type, ses_type::hdr, enc_cache::private, and ses_cache::ses_types.
Referenced by ses_process_elm_addlstatus().
|
static |
Definition at line 2263 of file scsi_enc_ses.c.
References ENC_VLOG.
Referenced by ses_process_elm_addlstatus().
|
static |
Update the softc with the additional element status data for this object, for SAS objects.
enc | SES softc to be updated. |
buf | The additional element status response buffer. |
bufsiz | Size of the response buffer. |
eip | The EIP bit value. |
tidx | Type index for this object. |
nobj | Number of objects attached to the SES softc. |
Definition at line 2617 of file scsi_enc_ses.c.
References ELMTYP_ARRAY_DEV, ELMTYP_DEVICE, ELMTYP_ESCC, ELMTYP_SAS_EXP, ELMTYP_SCSI_INI, ELMTYP_SCSI_TGT, ENC_VLOG, ses_elm_type_desc::etype_elm_type, ses_type::hdr, enc_cache::private, ses_elm_sas_descr_type(), ses_get_elm_addlstatus_sas_type0(), ses_get_elm_addlstatus_sas_type1(), SES_SASOBJ_TYPE_OTHER, SES_SASOBJ_TYPE_SLOT, and ses_cache::ses_types.
Referenced by ses_process_elm_addlstatus().
|
static |
Update the softc with the additional element status data for this object, for SAS type 0 objects.
enc | SES softc to be updated. |
buf | The additional element status response buffer. |
bufsiz | Size of the response buffer. |
eip | The EIP bit value. |
nobj | Number of objects attached to the SES softc. |
Definition at line 2491 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_sas_hdr::base_hdr, enc_cache::elm_map, enc_element::elm_private, ENC_VLOG, ses_elm_sas_base_hdr::num_phys, ses_addl_status::proto_data, ses_addl_status::proto_hdr, ses_addl_status::sas, and ses_addl_data::sasdev_phys.
Referenced by ses_get_elm_addlstatus_sas().
|
static |
Update the softc with the additional element status data for this object, for SAS type 1 objects.
enc | SES softc to be updated. |
buf | The additional element status response buffer. |
bufsiz | Size of the response buffer. |
eip | The EIP bit value. |
nobj | Number of objects attached to the SES softc. |
Definition at line 2550 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_sas_hdr::base_hdr, enc_cache::elm_map, enc_element::elm_private, enc_element::elm_type, ELMTYP_SAS_EXP, ENC_VLOG, ses_elm_sas_base_hdr::num_phys, ses_addl_status::proto_data, ses_addl_status::proto_hdr, ses_addl_status::sas, ses_addl_data::sasexp_phys, and ses_addl_data::sasport_phys.
Referenced by ses_get_elm_addlstatus_sas().
|
static |
Definition at line 2802 of file scsi_enc_ses.c.
References encioc_elm_desc::elm_desc_len, encioc_elm_desc::elm_desc_str, encioc_elm_desc::elm_idx, enc_cache::elm_map, enc_element::elm_private, and enc_softc::enc_cache.
|
static |
Respond to ENCIOC_GETELMDEVNAME, providing a device name for the given object id if one is available.
enc | SES softc to examine. |
objdn | ioctl structure to read/write device name info. |
Definition at line 2830 of file scsi_enc_ses.c.
References cam_periph_lock, cam_periph_unlock, encioc_elm_devnames::elm_devnames, encioc_elm_devnames::elm_idx, enc_cache::elm_map, encioc_elm_devnames::elm_names_len, encioc_elm_devnames::elm_names_size, enc_softc::enc_cache, enc_softc::periph, ses_elmdevname_callback(), and ses_paths_iter().
|
static |
Definition at line 2772 of file scsi_enc_ses.c.
References encioc_elm_status::cstat, encioc_elm_status::elm_idx, enc_cache::elm_map, enc_softc::enc_cache, and enc_element::encstat.
|
static |
Send a string to the primary subenclosure using the String Out SES diagnostic page.
enc | SES enclosure to run the command on. |
sstr | SES string structure to operate on |
ioc | Ioctl being performed |
Definition at line 2862 of file scsi_enc_ses.c.
References encioc_string::buf, encioc_string::bufsiz, CAM_DIR_IN, CAM_DIR_OUT, cam_strvis(), enc_softc::enc_daemon_cache, ENC_FREE, ENC_MALLOC, enc_runcmd(), ENC_STRING_MAX, ENCIOC_GETENCID, ENCIOC_GETENCNAME, ENCIOC_GETSTRING, ENCIOC_SETSTRING, ses_enc_desc::logical_id, enc_cache::private, ses_enc_desc::product_id, ses_enc_desc::product_rev, scsi_8btou64(), ses_cache::ses_nsubencs, ses_page_cdb(), SesStringIn, SesStringOut, ses_cache::subencs, and ses_enc_desc::vendor_id.
|
static |
Definition at line 2749 of file scsi_enc_ses.c.
|
static |
Initialize the storage of a SES iterator and reset it to the position just before the first element of the configuration.
enc | The SES softc for the SES instance whose configuration will be enumerated by this iterator. |
iter | The iterator object to initialize. |
Definition at line 416 of file scsi_enc_ses.c.
References ses_iterator::cache, ses_iterator::enc, and ses_iter_reset().
Referenced by ses_encode(), ses_process_config(), ses_process_elm_addlstatus(), ses_process_elm_descs(), ses_process_status(), and ses_publish_physpaths().
|
static |
Traverse the provided SES iterator to the next element within the configuration.
iter | The iterator to move. |
Definition at line 433 of file scsi_enc_ses.c.
References ses_iterator::cache, enc_cache::elm_map, ses_elm_type_desc::etype_maxelt, ses_iterator::global_element_index, ses_type::hdr, ses_iterator::individual_element_index, ITERATOR_INDEX_END, ITERATOR_INDEX_INVALID, enc_cache::nelms, enc_cache::private, ses_iterator::saved_individual_element_index, ses_cache::ses_ntypes, ses_cache::ses_types, ses_iterator::type_element_index, and ses_iterator::type_index.
Referenced by ses_iter_seek_to(), ses_process_config(), ses_process_elm_addlstatus(), ses_process_elm_descs(), ses_process_status(), and ses_publish_physpaths().
|
static |
Reset a SES iterator to just before the first element in the configuration.
iter | The iterator object to reset. |
The indexes within a reset iterator are invalid and will only become valid upon completion of a ses_iter_seek_to() or a ses_iter_next().
Definition at line 392 of file scsi_enc_ses.c.
References ses_iterator::global_element_index, ses_iterator::individual_element_index, ITERATOR_INDEX_INVALID, ses_iterator::saved_individual_element_index, ses_iterator::type_element_index, and ses_iterator::type_index.
Referenced by ses_iter_init(), and ses_iter_seek_to().
|
static |
Move the provided iterator forwards or backwards to the object having the give index.
iter | The iterator on which to perform the seek. |
element_index | The index of the element to find. |
index_type | The type (global or individual) of element_index. |
Definition at line 518 of file scsi_enc_ses.c.
References ses_iterator::cache, enc_cache::elm_map, ses_iterator::global_element_index, ses_iterator::individual_element_index, SES_ELEM_INDEX_GLOBAL, ses_iter_next(), and ses_iter_reset().
Referenced by ses_encode(), and ses_process_elm_addlstatus().
|
static |
Helper to set the CDB fields appropriately.
cdb | Buffer containing the cdb. |
pagenum | SES diagnostic page to query for. |
dir | Direction of query. |
Definition at line 1175 of file scsi_enc_ses.c.
References CAM_DIR_IN, RECEIVE_DIAGNOSTIC, and SEND_DIAGNOSTIC.
Referenced by ses_handle_string().
|
static |
ses_devids_iter() callback function used by ses_paths_iter() to map device ids to peripheral driver instances.
enc | SES instance containing elm |
elm | Element on which device ID matching is active. |
periph | A device ID corresponding to elm. |
arg | Argument passed through to callback on each invocation. |
Definition at line 876 of file scsi_enc_ses.c.
References ses_path_iter_args::callback, ses_path_iter_args::callback_arg, CAM_DEV_MATCH_LAST, CAM_DEV_MATCH_MORE, CAM_LUN_WILDCARD, CAM_REQ_CMP, CAM_STATUS_MASK, CAM_TARGET_WILDCARD, CAM_XPT_PATH_ID, ccb_dev_match::ccb_h, ccb::ccb_h, device_match_pattern::data, DEV_MATCH_DEVICE, DEV_MATCH_DEVID, DEV_MATCH_PATH, match_pattern::device_pattern, match_result::device_result, device_match_pattern::devid_pat, device_match_pattern::flags, ccb_hdr::func_code, device_id_match_pattern::id, device_id_match_pattern::id_len, scsi_vpd_id_descriptor::length, ccb_dev_match::match_buf_len, ccb_dev_match::matches, ccb_dev_match::num_patterns, ccb_hdr::path, cam_periph::path, device_match_pattern::path_id, device_match_result::path_id, ccb_dev_match::pattern_buf_len, ccb_dev_match::patterns, enc_softc::periph, ses_search_globally, ccb_hdr::status, ccb_dev_match::status, device_match_result::target_id, device_match_result::target_lun, xpt_action(), xpt_create_path(), XPT_DEV_MATCH, xpt_free_path(), and xpt_path_path_id().
Referenced by ses_paths_iter().
|
static |
Iterate over and find the matching periph objects for the specified element.
enc | SES instance containing elm |
elm | Element for which to perform periph object matching. |
callback | The callback function to invoke with each matching periph object. |
callback_arg | Argument passed through to callback on each invocation. |
Definition at line 950 of file scsi_enc_ses.c.
References ses_element::addl, ses_addl_status::ata, ses_elm_ata_hdr::bus, ses_path_iter_args::callback, ses_path_iter_args::callback_arg, CAM_PRIORITY_NORMAL, CAM_REQ_CMP, ccb_getdev::ccb_h, enc_element::elm_private, ccb_hdr::func_code, ses_addl_status::hdr, ses_addl_status::proto_data, ses_addl_status::proto_hdr, ses_addl_status::sas, ses_addl_data::sasdev_phys, scsi_4btoul(), ses_devids_iter(), ses_elm_addlstatus_proto(), ses_path_iter_devid_callback(), SPSP_PROTO_ATA, SPSP_PROTO_SAS, ccb_hdr::status, ses_elm_ata_hdr::target, xpt_action(), xpt_create_path(), xpt_free_path(), XPT_GDEV_TYPE, and xpt_setup_ccb().
Referenced by ses_get_elm_devnames(), ses_print_addl_data(), and ses_set_physpath().
|
static |
Definition at line 2959 of file scsi_enc_ses.c.
References enc_softc::enc_private, enc_update_request(), SES_FLAG_ADDLSTATUS, SES_FLAG_DESC, ses_softc::ses_flags, SES_UPDATE_GETELMADDLSTATUS, SES_UPDATE_GETELMDESCS, and SES_UPDATE_GETSTATUS.
Referenced by ses_device_found(), ses_process_config(), and ses_process_control_request().
|
static |
Print the additional element status data for this object.
enc | SES softc associated with the object. |
obj | The object to print the data for. |
Definition at line 2406 of file scsi_enc_ses.c.
References ses_element::addl, ses_addl_status::ata, ses_element::descr, enc_element::elm_private, enc_element::elm_type, elm_type_names, ELMTYP_LAST, ses_addl_status::hdr, enc_softc::periph, cam_periph::periph_name, ses_addl_status::proto_hdr, ses_addl_status::sas, ses_elm_addlstatus_proto(), ses_elm_sas_descr_type(), ses_elmdevname_callback(), ses_paths_iter(), ses_print_addl_data_ata(), ses_print_addl_data_sas_type0(), ses_print_addl_data_sas_type1(), SES_SASOBJ_TYPE_OTHER, SES_SASOBJ_TYPE_SLOT, SPSP_PROTO_ATA, SPSP_PROTO_FC, SPSP_PROTO_SAS, enc_element::subenclosure, enc_element::type_elm_idx, and cam_periph::unit_number.
Referenced by ses_publish_physpaths().
|
static |
Print the additional element status data for this object, for ATA objects.
sbp | Sbuf to print to. |
obj | The object to print the data for. |
Definition at line 2389 of file scsi_enc_ses.c.
References ses_element::addl, ses_addl_status::ata, ses_elm_ata_hdr::bus, enc_element::elm_private, ses_addl_status::proto_hdr, scsi_4btoul(), and ses_elm_ata_hdr::target.
Referenced by ses_print_addl_data().
|
static |
Print the additional element status data for this object, for SAS type 0 objects. See SES2 r20 Section 6.1.13.3.2.
sesname | SES device name associated with the object. |
sbp | Sbuf to print to. |
obj | The object to print the data for. |
Definition at line 2292 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_sas_hdr::base_hdr, ses_elm_sas_type0_eip_hdr::dev_slot_num, enc_element::elm_private, ses_addl_status::hdr, ses_elm_sas_device_phy::initiator_ports, ses_elm_sas_base_hdr::num_phys, ses_elm_sas_device_phy::parent_addr, ses_elm_sas_device_phy::phy_addr, ses_elm_sas_device_phy::phy_id, ses_addl_status::proto_data, ses_addl_status::proto_hdr, ses_addl_status::sas, ses_addl_data::sasdev_phys, scsi_8btou64(), ses_elm_addlstatus_eip(), ses_elm_sas_dev_phy_dev_type(), ses_elm_sas_dev_phy_sata_dev(), ses_elm_sas_type0_not_all_phys(), SES_PRINT_PORTS, ses_elm_sas_device_phy::target_ports, and ses_elm_sas_hdr::type0_eip.
Referenced by ses_print_addl_data().
|
static |
Print the additional element status data for this object, for SAS type 1 objects. See SES2 r20 Sections 6.1.13.3.3 and 6.1.13.3.4.
sesname | SES device name associated with the object. |
sbp | Sbuf to print to. |
obj | The object to print the data for. |
Definition at line 2341 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_sas_hdr::base_hdr, ses_elm_sas_expander_phy::connector_index, ses_elm_sas_port_phy::connector_index, enc_element::elm_private, enc_element::elm_type, ELMTYP_SAS_EXP, ses_elm_sas_base_hdr::num_phys, ses_elm_sas_expander_phy::other_index, ses_elm_sas_port_phy::other_index, ses_elm_sas_port_phy::phy_addr, ses_elm_sas_port_phy::phy_id, ses_addl_status::proto_data, ses_addl_status::proto_hdr, ses_addl_status::sas, ses_addl_data::sasexp_phys, ses_addl_data::sasport_phys, and scsi_8btou64().
Referenced by ses_print_addl_data().
|
static |
Process the config page and update associated structures.
enc | SES device to query. |
buf | Buffer containing the config page. |
xfer_len | Length of the config page in the buffer. |
Definition at line 1338 of file scsi_enc_ses.c.
References ses_enc_desc::byte0, CAM_DEBUG, CAM_DEBUG_SUBTRACE, ses_cache::cfg_page, enc_element::elm_idx, enc_cache::elm_map, enc_element::elm_private, enc_element::elm_type, enc_softc::enc_daemon_cache, ENC_DLOG, enc_update_request(), ENC_VLOG, ses_elm_type_desc::etype_elm_type, ses_elm_type_desc::etype_maxelt, ses_elm_type_desc::etype_subenc, ses_elm_type_desc::etype_txt_len, ses_page_hdr::gen_code, ses_iterator::global_element_index, ses_type::hdr, ses_cfg_page::hdr, ses_enc_desc::length, ses_enc_desc::logical_id, enc_cache::nelms, ses_enc_desc::num_types, cam_periph::path, enc_softc::periph, enc_cache::private, scsi_4btoul(), scsi_8btou64(), ses_cache_free(), ses_cfg_page_get_num_subenc(), ses_config_cache_valid(), ses_enc_desc_is_complete(), ses_enc_desc_next(), ses_iter_init(), ses_iter_next(), ses_cache::ses_nsubencs, ses_cache::ses_ntypes, ses_page_length(), ses_poll_status(), SES_PUBLISH_CACHE, ses_cache::ses_types, ses_enc_desc::subenc_id, enc_element::subenclosure, ses_cache::subencs, ses_cfg_page::subencs, ses_type::text, ses_iterator::type_element_index, enc_element::type_elm_idx, and ses_iterator::type_index.
|
static |
Definition at line 1934 of file scsi_enc_ses.c.
References enc_softc::enc_private, ses_softc::ses_pending_requests, ses_poll_status(), and ses_terminate_control_requests().
|
static |
Parse the additional status element data for each object.
enc | The SES softc to update. |
buf | The buffer containing the additional status element response. |
xfer_len | Size of the buffer. |
Definition at line 1718 of file scsi_enc_ses.c.
References ses_element::addl, ses_elm_addlstatus_base_hdr::byte0, ses_elm_addlstatus_eip_hdr::byte2, ses_elm_addlstatus_eip_hdr::element_index, ses_cache::elm_addlstatus_page, enc_element::elm_private, enc_softc::enc_daemon_cache, ENC_DLOG, enc_update_request(), ENC_VLOG, ses_page_hdr::gen_code, ses_iterator::global_element_index, ses_addl_status::hdr, ses_addl_elem_status_page::hdr, ses_iterator::individual_element_index, ITERATOR_INDEX_INVALID, ses_page_hdr::length, ses_elm_addlstatus_base_hdr::length, enc_cache::private, SES_ADDL_EIP_EIIOE_EI_GLOB, ses_cache_free_elm_addlstatus(), ses_config_cache_valid(), SES_EIP_HDR_EXTRA_LEN, SES_ELEM_INDEX_GLOBAL, SES_ELEM_INDEX_INDIVIDUAL, ses_elm_addlstatus_eip(), ses_elm_addlstatus_invalid(), ses_elm_addlstatus_proto(), ses_get_elm_addlstatus_ata(), ses_get_elm_addlstatus_fc(), ses_get_elm_addlstatus_sas(), ses_iter_init(), ses_iter_next(), ses_iter_seek_to(), ses_page_length(), SES_PUBLISH_CACHE, SES_PUBLISH_PHYSPATHS, ses_typehasaddlstatus(), SES_UPDATE_GETCONFIG, SPSP_PROTO_ATA, SPSP_PROTO_FC, SPSP_PROTO_SAS, TYPE_ADDLSTATUS_MANDATORY, TYPE_ADDLSTATUS_NONE, TYPE_ADDLSTATUS_OPTIONAL, ses_iterator::type_element_index, and ses_iterator::type_index.
|
static |
Parse the descriptors for each object.
enc | The SES softc to update. |
buf | The buffer containing the descriptor list response. |
xfer_len | Size of the buffer. |
Definition at line 2027 of file scsi_enc_ses.c.
References ses_element::descr, ses_element::descr_len, ses_cache::elm_descs_page, enc_softc::enc_daemon_cache, ENC_DLOG, enc_softc::enc_private, enc_update_request(), ENC_VLOG, ses_page_hdr::gen_code, ses_iterator::global_element_index, ses_elem_descr_page::hdr, ses_elm_desc_hdr::length, enc_cache::private, scsi_2btoul(), ses_cache_free_elm_descs(), ses_config_cache_valid(), SES_FLAG_ADDLSTATUS, ses_softc::ses_flags, ses_iter_init(), ses_iter_next(), ses_page_length(), SES_PUBLISH_CACHE, ses_sanitize_elm_desc(), SES_UPDATE_GETCONFIG, SES_UPDATE_GETELMADDLSTATUS, ses_iterator::type_element_index, and ses_iterator::type_index.
|
static |
Process the list of supported pages and update flags.
enc | SES device to query. |
buf | Buffer containing the config page. |
xfer_len | Length of the config page in the buffer. |
Definition at line 1285 of file scsi_enc_ses.c.
References CAM_DEBUG, CAM_DEBUG_SUBTRACE, ENC_DLOG, enc_softc::enc_private, ENC_VLOG, scsi_diag_page::length, scsi_diag_page::params, cam_periph::path, enc_softc::periph, scsi_2btoul(), SES_FLAG_ADDLSTATUS, SES_FLAG_DESC, ses_softc::ses_flags, SesAddlElementStatus, and SesElementDescriptor.
|
static |
Update the status page and associated structures.
enc | SES softc to update for. |
buf | Buffer containing the status page. |
bufsz | Amount of data in the buffer. |
Definition at line 1533 of file scsi_enc_ses.c.
References ses_status_element::bytes, ses_status_page::elements, enc_softc::enc_daemon_cache, ENC_DLOG, enc_softc::enc_private, enc_cache::enc_status, enc_update_request(), ENC_VLOG, ses_page_hdr::gen_code, ses_iterator::global_element_index, ses_status_page::hdr, ses_page_hdr::page_code, ses_page_hdr::page_specific_flags, enc_cache::private, scsi_4btoul(), ses_cache_free(), ses_cache_free_status(), ses_config_cache_valid(), SES_FLAG_ADDLSTATUS, SES_FLAG_DESC, ses_softc::ses_flags, ses_iter_init(), ses_iter_next(), ses_page_length(), SES_PUBLISH_CACHE, SES_UPDATE_GETCONFIG, SesShortStatus, ses_cache::status_page, ses_iterator::type_element_index, and ses_iterator::type_index.
|
static |
Definition at line 1976 of file scsi_enc_ses.c.
References ses_iterator::enc, enc_softc::enc_cache, enc_softc::enc_cache_lock, enc_softc::enc_daemon_cache, and ses_cache_clone().
|
static |
Definition at line 1951 of file scsi_enc_ses.c.
References ses_iterator::enc, enc_softc::enc_daemon_cache, ses_iter_init(), ses_iter_next(), ses_print_addl_data(), and ses_set_physpath().
|
static |
Definition at line 2001 of file scsi_enc_ses.c.
Referenced by ses_process_elm_descs().
|
static |
Definition at line 2781 of file scsi_enc_ses.c.
References cam_periph_sleep, encioc_elm_status::cstat, encioc_elm_status::elm_idx, ses_control_request::elm_idx, ses_control_request::elm_stat, enc_softc::enc_private, enc_update_request(), enc_softc::periph, ses_control_request::result, SES_PROCESS_CONTROL_REQS, ses_softc::ses_requests, and SESCTL_CSEL.
|
static |
Definition at line 2755 of file scsi_enc_ses.c.
References cam_periph_sleep, ses_comstat::comstatus, ses_control_request::elm_idx, ses_control_request::elm_stat, enc_softc::enc_private, enc_update_request(), enc_softc::periph, ses_control_request::result, SES_PROCESS_CONTROL_REQS, ses_softc::ses_requests, and SES_SETSTATUS_ENC_IDX.
|
static |
Set a device's physical path string in CAM XPT.
enc | SES instance containing elm |
elm | Element to publish physical path string for |
iter | Iterator whose state corresponds to elm |
Definition at line 1085 of file scsi_enc_ses.c.
References ses_element::addl, ccb_dev_advinfo::buf, ccb_dev_advinfo::bufsiz, ccb_dev_advinfo::buftype, CAM_DEV_QFRZN, cam_periph_lock, cam_periph_unlock, CAM_PRIORITY_NORMAL, cam_release_devq(), CAM_REQ_CMP, CAM_SCSI_DEVID_MAXLEN, ccb_dev_advinfo::ccb_h, CDAI_FLAG_NONE, CDAI_TYPE_SCSI_DEVID, ses_element::descr, ses_element::descr_len, enc_element::elm_private, ENC_FREE, ccb_dev_advinfo::flags, ccb_hdr::func_code, ses_addl_status::hdr, scsi_vpd_id_descriptor::identifier, ccb_hdr::path, cam_periph::path, enc_softc::periph, ccb_dev_advinfo::provsiz, scsi_8btou64(), scsi_devid_is_naa_ieee_reg(), scsi_get_devid(), ses_paths_iter(), ses_setphyspath_callback(), ccb_hdr::status, ses_iterator::type_element_index, ses_iterator::type_index, xpt_action(), XPT_DEV_ADVINFO, and xpt_setup_ccb().
Referenced by ses_publish_physpaths().
|
static |
Discover whether this instance supports timed completion of a RECEIVE DIAGNOSTIC RESULTS command requesting the Enclosure Status page, and store the result in the softc, updating if necessary.
enc | SES instance to query and update. |
tc_en | Value of timed completion to set (see |
Definition at line 1204 of file scsi_enc_ses.c.
References ses_mgmt_mode_page::byte5, cam_periph_getccb(), cam_periph_runccb(), CAM_PRIORITY_NORMAL, CAM_REQ_CMP, ccb, ccb::ccb_h, ccb::csio, ENC_CFLAGS, enc_error(), ENC_FLAGS, ENC_FREE, ENC_LOG, ENC_MALLOCZ, enc_softc::enc_private, ENC_VLOG, ses_mgmt_mode_page::max_comp_time, MSG_SIMPLE_Q_TAG, enc_softc::periph, scsi_mode_select(), scsi_mode_sense(), SES_FLAG_TIMEDCOMP, ses_softc::ses_flags, SES_MGMT_MODE_PAGE_CODE, SES_MGMT_TIMED_COMP_EN, SF_QUIET_IR, SMS_PAGE_CTRL_CURRENT, SSD_FULL_SIZE, ccb_hdr::status, and xpt_release_ccb().
Referenced by ses_softc_init().
|
static |
ses_paths_iter() callback to set the physical path on the CAM EDT entries corresponding to a given SES element.
enc | SES instance containing elm |
elm | Element on which periph matching is active. |
periph | A periph instance that matches elm. |
arg | Argument passed through to callback on each invocation. |
Definition at line 1037 of file scsi_enc_ses.c.
References ccb_dev_advinfo::buf, ccb_dev_advinfo::bufsiz, ccb_dev_advinfo::buftype, CAM_DEV_QFRZN, CAM_PRIORITY_NORMAL, cam_release_devq(), CAM_REQ_CMP, ccb_dev_advinfo::ccb_h, ccb::ccb_h, CDAI_FLAG_NONE, CDAI_FLAG_STORE, CDAI_TYPE_PHYS_PATH, ccb_dev_advinfo::flags, ccb_hdr::func_code, ccb_hdr::path, ccb_hdr::status, xpt_action(), XPT_DEV_ADVINFO, xpt_path_lock, xpt_path_unlock, and xpt_setup_ccb().
Referenced by ses_set_physpath().
|
static |
Definition at line 2738 of file scsi_enc_ses.c.
References enc_softc::enc_cache, enc_softc::enc_daemon_cache, ENC_FREE_AND_NULL, enc_softc::enc_private, enc_cache::private, and ses_cache_free().
int ses_softc_init | ( | enc_softc_t * | enc | ) |
Initialize a new SES instance.
enc | SES softc structure to set up the instance in. |
doinit | Do the initialization (see main driver). |
Definition at line 3008 of file scsi_enc_ses.c.
References CAM_DEBUG, CAM_DEBUG_SUBTRACE, enc_softc::enc_cache, enc_softc::enc_daemon_cache, ENC_FREE_AND_NULL, enc_softc::enc_fsm_states, enc_fsm_states, ENC_MALLOCZ, enc_softc::enc_private, enc_update_request(), enc_softc::enc_vec, cam_periph::path, enc_softc::periph, enc_cache::private, ses_enc_vec, ses_softc::ses_pending_requests, ses_softc::ses_requests, ses_set_timed_completion(), and SES_UPDATE_PAGES.
|
static |
Definition at line 2729 of file scsi_enc_ses.c.
References enc_softc::enc_private, ses_softc::ses_requests, and ses_terminate_control_requests().
|
static |
Definition at line 130 of file scsi_enc_ses.c.
References ses_control_request::result.
Referenced by ses_fill_control_request(), ses_process_control_request(), and ses_softc_invalidate().
|
static |
Check to see whether a given type (as obtained via type headers) is supported by the additional status command.
enc | SES softc to check. |
typidx | Type index to check for. |
Definition at line 1677 of file scsi_enc_ses.c.
References ELMTYP_ARRAY_DEV, ELMTYP_DEVICE, ELMTYP_ESCC, ELMTYP_SAS_EXP, ELMTYP_SCSI_INI, ELMTYP_SCSI_TGT, enc_softc::enc_daemon_cache, ses_elm_type_desc::etype_elm_type, ses_type::hdr, enc_cache::private, ses_cache::ses_types, TYPE_ADDLSTATUS_MANDATORY, TYPE_ADDLSTATUS_NONE, and TYPE_ADDLSTATUS_OPTIONAL.
Referenced by ses_process_elm_addlstatus().
SYSCTL_INT | ( | _kern_cam_enc | , |
OID_AUTO | , | ||
search_globally | , | ||
CTLFLAG_RWTUN | , | ||
& | ses_search_globally, | ||
0 | , | ||
"Search for disks on other buses" | |||
) |
TAILQ_HEAD | ( | ses_control_reqlist | , |
ses_control_request | |||
) |
|
static |
Definition at line 269 of file scsi_enc_ses.c.
Referenced by ses_softc_init().
|
static |
Definition at line 2984 of file scsi_enc_ses.c.
Referenced by ses_softc_init().
|
static |
Definition at line 259 of file scsi_enc_ses.c.
|
static |
Definition at line 258 of file scsi_enc_ses.c.
|
static |
Definition at line 261 of file scsi_enc_ses.c.
|
static |
Definition at line 265 of file scsi_enc_ses.c.
|
static |
Definition at line 264 of file scsi_enc_ses.c.
|
static |
Definition at line 263 of file scsi_enc_ses.c.
|
static |
Definition at line 260 of file scsi_enc_ses.c.
|
static |
Definition at line 262 of file scsi_enc_ses.c.
|
static |
Definition at line 267 of file scsi_enc_ses.c.
|
static |
Definition at line 266 of file scsi_enc_ses.c.
|
static |
Definition at line 377 of file scsi_enc_ses.c.
Referenced by ses_path_iter_devid_callback().
|
static |
Definition at line 254 of file scsi_enc_ses.c.