FreeBSD kernel CAM code
|
#include <sys/sysctl.h>
Go to the source code of this file.
Data Structures | |
struct | enc_element |
struct | enc_fsm_state |
struct | enc_vec |
struct | enc_cache |
struct | enc_softc |
struct | ses_mgmt_mode_page |
Macros | |
#define | ENC_FLAG_INVALID 0x01 |
#define | ENC_FLAG_INITIALIZED 0x02 |
#define | ENC_FLAG_SHUTDOWN 0x04 |
#define | ENC_UPDATE_NONE 0x00 |
#define | ENC_UPDATE_INVALID 0xff |
#define | ENC_ANNOUNCE_SZ 400 |
#define | SES_MGMT_MODE_PAGE_CODE 0x14 |
#define | SES_MGMT_MODE_PAGE_LEN 6 |
#define | SES_MGMT_TIMED_COMP_EN 0x1 |
#define | ENC_CFLAGS CAM_RETRY_SELTO |
#define | ENC_FLAGS SF_NO_PRINT | SF_RETRY_UA |
#define | STRNCMP strncmp |
#define | PRINTF printf |
#define | ENC_LOG enc_log |
#define | ENC_DLOG if (0) enc_log |
#define | ENC_VLOG if (enc_verbose) enc_log |
#define | ENC_MALLOC(amt) malloc(amt, M_SCSIENC, M_NOWAIT) |
#define | ENC_MALLOCZ(amt) malloc(amt, M_SCSIENC, M_ZERO|M_NOWAIT) |
#define | ENC_FREE(ptr) free((void *)((uintptr_t)ptr), M_SCSIENC) |
#define | ENC_FREE_AND_NULL(ptr) |
#define | MEMZERO bzero |
#define | MEMCPY(dest, src, amt) bcopy(src, dest, amt) |
Enumerations | |
enum | enctyp { ENC_NONE , ENC_SES , ENC_SES_PASSTHROUGH , ENC_SAFT , ENC_SEMB_SES , ENC_SEMB_SAFT } |
Functions | |
static enc_cache_t * | enc_other_cache (enc_softc_t *enc, enc_cache_t *primary) |
int | enc_runcmd (struct enc_softc *, char *, int, char *, int *) |
void | enc_log (struct enc_softc *, const char *,...) |
int | enc_error (union ccb *, uint32_t, uint32_t) |
void | enc_update_request (enc_softc_t *, uint32_t) |
Queue an update request for a given action, if needed. More... | |
SYSCTL_DECL (_kern_cam_enc) | |
MALLOC_DECLARE (M_SCSIENC) | |
Variables | |
enc_softc_init_t | ses_softc_init |
enc_softc_init_t | safte_softc_init |
int | enc_verbose |
#define ENC_ANNOUNCE_SZ 400 |
Definition at line 166 of file scsi_enc_internal.h.
#define ENC_CFLAGS CAM_RETRY_SELTO |
Definition at line 208 of file scsi_enc_internal.h.
#define ENC_DLOG if (0) enc_log |
Definition at line 216 of file scsi_enc_internal.h.
#define ENC_FLAG_INITIALIZED 0x02 |
Definition at line 143 of file scsi_enc_internal.h.
#define ENC_FLAG_INVALID 0x01 |
Definition at line 142 of file scsi_enc_internal.h.
#define ENC_FLAG_SHUTDOWN 0x04 |
Definition at line 144 of file scsi_enc_internal.h.
#define ENC_FLAGS SF_NO_PRINT | SF_RETRY_UA |
Definition at line 209 of file scsi_enc_internal.h.
#define ENC_FREE | ( | ptr | ) | free((void *)((uintptr_t)ptr), M_SCSIENC) |
Definition at line 222 of file scsi_enc_internal.h.
#define ENC_FREE_AND_NULL | ( | ptr | ) |
Definition at line 223 of file scsi_enc_internal.h.
#define ENC_LOG enc_log |
Definition at line 212 of file scsi_enc_internal.h.
#define ENC_MALLOC | ( | amt | ) | malloc(amt, M_SCSIENC, M_NOWAIT) |
Definition at line 219 of file scsi_enc_internal.h.
#define ENC_MALLOCZ | ( | amt | ) | malloc(amt, M_SCSIENC, M_ZERO|M_NOWAIT) |
Definition at line 220 of file scsi_enc_internal.h.
#define ENC_UPDATE_INVALID 0xff |
Definition at line 155 of file scsi_enc_internal.h.
#define ENC_UPDATE_NONE 0x00 |
Definition at line 154 of file scsi_enc_internal.h.
#define ENC_VLOG if (enc_verbose) enc_log |
Definition at line 218 of file scsi_enc_internal.h.
#define MEMCPY | ( | dest, | |
src, | |||
amt | |||
) | bcopy(src, dest, amt) |
Definition at line 230 of file scsi_enc_internal.h.
#define MEMZERO bzero |
Definition at line 229 of file scsi_enc_internal.h.
#define PRINTF printf |
Definition at line 211 of file scsi_enc_internal.h.
#define SES_MGMT_MODE_PAGE_CODE 0x14 |
Definition at line 182 of file scsi_enc_internal.h.
#define SES_MGMT_MODE_PAGE_LEN 6 |
Definition at line 184 of file scsi_enc_internal.h.
#define SES_MGMT_TIMED_COMP_EN 0x1 |
Definition at line 187 of file scsi_enc_internal.h.
#define STRNCMP strncmp |
Definition at line 210 of file scsi_enc_internal.h.
typedef struct enc_cache enc_cache_t |
typedef void() enc_device_found_t(enc_softc_t *) |
Definition at line 98 of file scsi_enc_internal.h.
typedef struct enc_element enc_element_t |
typedef int() enc_get_elm_desc_t(enc_softc_t *, encioc_elm_desc_t *) |
Definition at line 94 of file scsi_enc_internal.h.
typedef int() enc_get_elm_devnames_t(enc_softc_t *, encioc_elm_devnames_t *) |
Definition at line 95 of file scsi_enc_internal.h.
typedef int() enc_get_elm_status_t(enc_softc_t *, encioc_elm_status_t *, int) |
Definition at line 92 of file scsi_enc_internal.h.
typedef int() enc_handle_string_t(enc_softc_t *, encioc_string_t *, unsigned long) |
Definition at line 96 of file scsi_enc_internal.h.
typedef int() enc_init_enc_t(enc_softc_t *) |
Definition at line 90 of file scsi_enc_internal.h.
typedef void() enc_poll_status_t(enc_softc_t *) |
Definition at line 99 of file scsi_enc_internal.h.
typedef int() enc_set_elm_status_t(enc_softc_t *, encioc_elm_status_t *, int) |
Definition at line 93 of file scsi_enc_internal.h.
typedef int() enc_set_enc_status_t(enc_softc_t *, encioc_enc_status_t, int) |
Definition at line 91 of file scsi_enc_internal.h.
typedef void() enc_softc_cleanup_t(enc_softc_t *) |
Definition at line 89 of file scsi_enc_internal.h.
typedef int() enc_softc_init_t(enc_softc_t *) |
Definition at line 87 of file scsi_enc_internal.h.
typedef void() enc_softc_invalidate_t(enc_softc_t *) |
Definition at line 88 of file scsi_enc_internal.h.
typedef struct enc_softc enc_softc_t |
Definition at line 64 of file scsi_enc_internal.h.
typedef int fsm_done_handler_t(enc_softc_t *ssc, struct enc_fsm_state *state, union ccb *ccb, uint8_t **bufp, int error, int xfer_len) |
Definition at line 73 of file scsi_enc_internal.h.
Definition at line 71 of file scsi_enc_internal.h.
typedef int fsm_fill_handler_t(enc_softc_t *ssc, struct enc_fsm_state *state, union ccb *ccb, uint8_t *buf) |
Definition at line 67 of file scsi_enc_internal.h.
enum enctyp |
Enumerator | |
---|---|
ENC_NONE | |
ENC_SES | |
ENC_SES_PASSTHROUGH | |
ENC_SAFT | |
ENC_SEMB_SES | |
ENC_SEMB_SAFT |
Definition at line 54 of file scsi_enc_internal.h.
int enc_error | ( | union ccb * | ccb, |
uint32_t | cflags, | ||
uint32_t | sflags | ||
) |
Definition at line 346 of file scsi_enc.c.
References cam_periph_error().
Referenced by enc_ioctl(), enc_runcmd(), and ses_set_timed_completion().
void enc_log | ( | struct enc_softc * | enc, |
const char * | fmt, | ||
... | |||
) |
Definition at line 652 of file scsi_enc.c.
References enc_softc::periph, cam_periph::periph_name, and cam_periph::unit_number.
|
inlinestatic |
Definition at line 171 of file scsi_enc_internal.h.
References enc_softc::enc_cache, and enc_softc::enc_daemon_cache.
Referenced by ses_cache_free(), ses_cache_free_elm_addlstatus(), ses_cache_free_elm_descs(), and ses_cache_free_status().
int enc_runcmd | ( | struct enc_softc * | enc, |
char * | cdb, | ||
int | cdbl, | ||
char * | dptr, | ||
int * | dlenp | ||
) |
Definition at line 579 of file scsi_enc.c.
References ata_28bit_cmd(), ccb::ataio, CAM_DEBUG, CAM_DEBUG_SUBTRACE, CAM_DEBUG_TRACE, CAM_DIR_IN, CAM_DIR_NONE, CAM_DIR_OUT, cam_fill_ataio(), cam_fill_csio(), cam_periph_getccb(), cam_periph_runccb(), CAM_PRIORITY_NORMAL, ccb, ccb::ccb_h, cdb_t::cdb_bytes, ccb_scsiio::cdb_io, ccb::csio, ENC_CFLAGS, enc_error(), ENC_FLAGS, ENC_SEMB_SAFT, ENC_SEMB_SES, enc_softc::enc_type, ccb_hdr::func_code, IOCDBLEN, MSG_SIMPLE_Q_TAG, cam_periph::path, enc_softc::periph, READ_BUFFER, RECEIVE_DIAGNOSTIC, ccb_scsiio::resid, ccb_ataio::resid, SEND_DIAGNOSTIC, XPT_ATA_IO, and xpt_release_ccb().
Referenced by safte_init_enc(), and ses_handle_string().
void enc_update_request | ( | enc_softc_t * | enc, |
uint32_t | action | ||
) |
Queue an update request for a given action, if needed.
enc | SES softc to queue the request for. |
action | Action requested. |
Definition at line 735 of file scsi_enc.c.
References enc_softc::current_action, enc_softc::enc_daemon, ENC_DLOG, ENC_UPDATE_NONE, and enc_softc::pending_actions.
Referenced by safte_fill_control_request(), safte_fill_read_buf_io(), safte_poll_status(), safte_process_config(), safte_process_control_request(), safte_set_elm_status(), safte_set_enc_status(), ses_device_found(), ses_poll_status(), ses_process_config(), ses_process_elm_addlstatus(), ses_process_elm_descs(), ses_process_status(), ses_set_elm_status(), ses_set_enc_status(), and ses_softc_init().
MALLOC_DECLARE | ( | M_SCSIENC | ) |
SYSCTL_DECL | ( | _kern_cam_enc | ) |
|
extern |
Definition at line 87 of file scsi_enc.c.
enc_softc_init_t safte_softc_init |
Definition at line 201 of file scsi_enc_internal.h.
Referenced by enc_ctor().
enc_softc_init_t ses_softc_init |
Definition at line 198 of file scsi_enc_internal.h.
Referenced by enc_ctor().