FreeBSD kernel CAM code
|
#include "opt_cam.h"
#include <sys/cdefs.h>
Go to the source code of this file.
Data Structures | |
struct | cam_pinfo |
struct | cam_status_entry |
Macros | |
#define | CAM_XPT_PATH_ID ((path_id_t)~0) |
#define | CAM_BUS_WILDCARD ((path_id_t)~0) |
#define | CAM_TARGET_WILDCARD ((target_id_t)~0) |
#define | CAM_LUN_WILDCARD (~(u_int)0) |
#define | CAM_EXTLUN_BYTE_SWIZZLE(lun) |
#define | CAM_MAX_CDBLEN 16 |
#define | CAM_PRIORITY_HOST ((CAM_RL_HOST << 8) + 0x80) |
#define | CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80) |
#define | CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80) |
#define | CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80) |
#define | CAM_PRIORITY_OOB (CAM_RL_DEV << 8) |
#define | CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) |
#define | CAM_PRIORITY_NONE (u_int32_t)-1 |
#define | CAM_UNQUEUED_INDEX -1 |
#define | CAM_ACTIVE_INDEX -2 |
#define | CAM_DONEQ_INDEX -3 |
#define | CAM_ASYNC_INDEX -4 |
#define | CAM_EXTRAQ_INDEX INT_MAX |
#define | GENERATIONCMP(x, op, y) ((int32_t)((x) - (y)) op 0) |
Typedefs | |
typedef u_int | path_id_t |
typedef u_int | target_id_t |
typedef u_int64_t | lun_id_t |
Functions | |
__BEGIN_DECLS typedef int() | cam_quirkmatch_t (caddr_t, caddr_t) |
caddr_t | cam_quirkmatch (caddr_t target, caddr_t quirk_table, int num_entries, int entry_size, cam_quirkmatch_t *comp_func) |
void | cam_strvis (u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen) |
void | cam_strvis_flag (u_int8_t *dst, const u_int8_t *src, int srclen, int dstlen, uint32_t flags) |
void | cam_strvis_sbuf (struct sbuf *sb, const u_int8_t *src, int srclen, uint32_t flags) |
int | cam_strmatch (const u_int8_t *str, const u_int8_t *pattern, int str_len) |
const struct cam_status_entry * | cam_fetch_status_entry (cam_status status) |
char * | cam_error_string (union ccb *ccb, char *str, int str_len, cam_error_string_flags flags, cam_error_proto_flags proto_flags) |
void | cam_error_print (union ccb *ccb, cam_error_string_flags flags, cam_error_proto_flags proto_flags) |
static __END_DECLS __inline void | cam_init_pinfo (cam_pinfo *pinfo) |
Variables | |
const struct cam_status_entry | cam_status_table [] |
const int | num_cam_status_entries |
int | cam_sort_io_queues |
#define CAM_EXTLUN_BYTE_SWIZZLE | ( | lun | ) |
#define CAM_PRIORITY_BUS ((CAM_RL_BUS << 8) + 0x80) |
#define CAM_PRIORITY_DEV ((CAM_RL_DEV << 8) + 0x80) |
#define CAM_PRIORITY_HOST ((CAM_RL_HOST << 8) + 0x80) |
#define CAM_PRIORITY_NORMAL ((CAM_RL_NORMAL << 8) + 0x80) |
#define CAM_PRIORITY_OOB (CAM_RL_DEV << 8) |
#define CAM_PRIORITY_XPT ((CAM_RL_XPT << 8) + 0x80) |
#define CAM_TARGET_WILDCARD ((target_id_t)~0) |
#define GENERATIONCMP | ( | x, | |
op, | |||
y | |||
) | ((int32_t)((x) - (y)) op 0) |
typedef u_int target_id_t |
anonymous enum |
enum cam_error_ata_flags |
enum cam_error_scsi_flags |
enum cam_error_smp_flags |
enum cam_flags |
enum cam_rl |
enum cam_status |
enum cam_strvis_flags |
void cam_error_print | ( | union ccb * | ccb, |
cam_error_string_flags | flags, | ||
cam_error_proto_flags | proto_flags | ||
) |
Definition at line 510 of file cam.c.
References cam_error_string().
Referenced by cam_periph_error(), and dasetgeom().
char * cam_error_string | ( | union ccb * | ccb, |
char * | str, | ||
int | str_len, | ||
cam_error_string_flags | flags, | ||
cam_error_proto_flags | proto_flags | ||
) |
Definition at line 315 of file cam.c.
References ata_command_sbuf(), ata_res_sbuf(), ata_status_sbuf(), ccb::ataio, CAM_ATA_STATUS_ERROR, CAM_AUTOSNS_VALID, CAM_EAF_PRINT_RESULT, CAM_EAF_PRINT_STATUS, CAM_EPF_ALL, CAM_EPF_LEVEL_MASK, CAM_EPF_MINIMAL, CAM_EPF_NONE, CAM_EPF_NORMAL, CAM_ESF_CAM_STATUS, CAM_ESF_COMMAND, CAM_ESF_NONE, CAM_ESF_PRINT_SENSE, CAM_ESF_PRINT_STATUS, CAM_ESF_PROTO_STATUS, CAM_ESMF_PRINT_FULL_CMD, CAM_ESMF_PRINT_STATUS, cam_fetch_status_entry(), CAM_SCSI_STATUS_ERROR, CAM_SMP_STATUS_ERROR, CAM_STATUS_MASK, ccb_scsiio::ccb_h, ccb::ccb_h, ccb::csio, ccb_hdr::func_code, nvme_command_sbuf(), ccb::nvmeio, ccb_hdr::path, ccb_ataio::res, scsi_command_string(), scsi_sense_sbuf(), ccb_scsiio::scsi_status, SCSI_STATUS_CHECK_COND, scsi_status_string(), smp_command_sbuf(), smp_error_desc(), ccb_smpio::smp_response, ccb::smpio, SSS_FLAG_NONE, ccb_hdr::status, cam_status_entry::status_text, XPT_ATA_IO, XPT_NVME_ADMIN, XPT_NVME_IO, xpt_path_string(), XPT_SCSI_IO, and XPT_SMP_IO.
Referenced by cam_error_print().
const struct cam_status_entry * cam_fetch_status_entry | ( | cam_status | status | ) |
Definition at line 292 of file cam.c.
References CAM_STATUS_MASK, cam_status_table, and camstatusentrycomp().
Referenced by cam_error_string(), ctlfe_lun_enable(), ctlfe_online(), passasync(), and sgasync().
|
static |
Definition at line 408 of file cam.h.
References CAM_PRIORITY_NONE, CAM_UNQUEUED_INDEX, cam_pinfo::index, and cam_pinfo::priority.
Referenced by xpt_alloc_device().
caddr_t cam_quirkmatch | ( | caddr_t | target, |
caddr_t | quirk_table, | ||
int | num_entries, | ||
int | entry_size, | ||
cam_quirkmatch_t * | comp_func | ||
) |
Definition at line 281 of file cam.c.
Referenced by adaregister(), ata_find_quirk(), cdregister(), daregister(), fetchtableentries(), saregister(), scsi_find_quirk(), scsi_op_desc(), and xptdevicematch().
__BEGIN_DECLS typedef int() cam_quirkmatch_t | ( | caddr_t | , |
caddr_t | |||
) |
int cam_strmatch | ( | const u_int8_t * | str, |
const u_int8_t * | pattern, | ||
int | str_len | ||
) |
Definition at line 204 of file cam.c.
References cam_strmatch().
Referenced by ata_identify_match(), ata_static_identify_match(), cam_strmatch(), scsi_inquiry_match(), and scsi_static_inquiry_match().
void cam_strvis | ( | u_int8_t * | dst, |
const u_int8_t * | src, | ||
int | srclen, | ||
int | dstlen | ||
) |
Definition at line 124 of file cam.c.
References cam_strvis_flag(), and CAM_STRVIS_FLAG_NONASCII_ESC.
Referenced by ata_print_ident_short(), cdregister(), daregister(), saextget(), semb_print_ident(), semb_print_ident_short(), ses_handle_string(), and smp_report_manuf_info_sbuf().
void cam_strvis_flag | ( | u_int8_t * | dst, |
const u_int8_t * | src, | ||
int | srclen, | ||
int | dstlen, | ||
uint32_t | flags | ||
) |
Definition at line 131 of file cam.c.
References cam_strvis_sbuf().
Referenced by cam_strvis(), ndaregister(), and nvme_probe_done().
void cam_strvis_sbuf | ( | struct sbuf * | sb, |
const u_int8_t * | src, | ||
int | srclen, | ||
uint32_t | flags | ||
) |
Definition at line 142 of file cam.c.
References CAM_STRVIS_FLAG_NONASCII_ESC, CAM_STRVIS_FLAG_NONASCII_MASK, CAM_STRVIS_FLAG_NONASCII_RAW, CAM_STRVIS_FLAG_NONASCII_SPC, and CAM_STRVIS_FLAG_NONASCII_TRIM.
Referenced by ata_print_ident_short_sbuf(), cam_strvis_flag(), nvme_print_ident(), scsi_attrib_ascii_sbuf(), scsi_attrib_vendser_sbuf(), scsi_print_inquiry_short_sbuf(), semb_print_ident_sbuf(), and semb_print_ident_short_sbuf().
|
extern |
Definition at line 63 of file cam.c.
Referenced by cam_fetch_status_entry().
|
extern |