Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_ccb.h
Show First 20 Lines • Show All 215 Lines • ▼ Show 20 Lines | /* SCSI Control Functions: 0x10->0x1F */ | ||||
XPT_SCAN_TGT = 0x1e | XPT_FC_QUEUED | XPT_FC_USER_CCB | XPT_SCAN_TGT = 0x1e | XPT_FC_QUEUED | XPT_FC_USER_CCB | ||||
| XPT_FC_XPT_ONLY, | | XPT_FC_XPT_ONLY, | ||||
/* Scan Target */ | /* Scan Target */ | ||||
XPT_NVME_ADMIN = 0x1f | XPT_FC_DEV_QUEUED, | XPT_NVME_ADMIN = 0x1f | XPT_FC_DEV_QUEUED, | ||||
/* Execute the requested NVMe Admin operation */ | /* Execute the requested NVMe Admin operation */ | ||||
/* HBA engine commands 0x20->0x2F */ | |||||
XPT_ENG_INQ = 0x20 | XPT_FC_XPT_ONLY, | |||||
/* HBA engine feature inquiry */ | |||||
XPT_ENG_EXEC = 0x21 | XPT_FC_DEV_QUEUED, | |||||
/* HBA execute engine request */ | |||||
/* Target mode commands: 0x30->0x3F */ | /* Target mode commands: 0x30->0x3F */ | ||||
XPT_EN_LUN = 0x30, | XPT_EN_LUN = 0x30, | ||||
/* Enable LUN as a target */ | /* Enable LUN as a target */ | ||||
XPT_TARGET_IO = 0x31 | XPT_FC_DEV_QUEUED, | XPT_TARGET_IO = 0x31 | XPT_FC_DEV_QUEUED, | ||||
/* Execute target I/O request */ | /* Execute target I/O request */ | ||||
XPT_ACCEPT_TARGET_IO = 0x32 | XPT_FC_QUEUED | XPT_FC_USER_CCB, | XPT_ACCEPT_TARGET_IO = 0x32 | XPT_FC_QUEUED | XPT_FC_USER_CCB, | ||||
/* Accept Host Target Mode CDB */ | /* Accept Host Target Mode CDB */ | ||||
XPT_CONT_TARGET_IO = 0x33 | XPT_FC_DEV_QUEUED, | XPT_CONT_TARGET_IO = 0x33 | XPT_FC_DEV_QUEUED, | ||||
▲ Show 20 Lines • Show All 674 Lines • ▼ Show 20 Lines | struct ccb_abort { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
union ccb *abort_ccb; /* Pointer to CCB to abort */ | union ccb *abort_ccb; /* Pointer to CCB to abort */ | ||||
}; | }; | ||||
/* Reset SCSI Bus CCB */ | /* Reset SCSI Bus CCB */ | ||||
struct ccb_resetbus { | struct ccb_resetbus { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
}; | }; | ||||
mav: I am curios why you've removed resetbus, but left resetdev. Obviously the last one is used in… | |||||
/* Reset SCSI Device CCB */ | /* Reset SCSI Device CCB */ | ||||
struct ccb_resetdev { | struct ccb_resetdev { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
}; | }; | ||||
/* Terminate I/O Process Request CCB */ | /* Terminate I/O Process Request CCB */ | ||||
struct ccb_termio { | struct ccb_termio { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
▲ Show 20 Lines • Show All 275 Lines • ▼ Show 20 Lines | struct ccb_immed_notify { | ||||
u_int8_t initiator_id; /* Id of initiator that selected */ | u_int8_t initiator_id; /* Id of initiator that selected */ | ||||
u_int8_t message_args[7]; /* Message Arguments */ | u_int8_t message_args[7]; /* Message Arguments */ | ||||
}; | }; | ||||
struct ccb_notify_ack { | struct ccb_notify_ack { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
u_int16_t seq_id; /* Sequence identifier */ | u_int16_t seq_id; /* Sequence identifier */ | ||||
u_int8_t event; /* Event flags */ | u_int8_t event; /* Event flags */ | ||||
}; | }; | ||||
Not Done Inline ActionsSame as above -- if you want to delete structure, you should also delete the opcode, if we consider it obsolete. mav: Same as above -- if you want to delete structure, you should also delete the opcode, if we… | |||||
struct ccb_immediate_notify { | struct ccb_immediate_notify { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
u_int tag_id; /* Tag for immediate notify */ | u_int tag_id; /* Tag for immediate notify */ | ||||
u_int seq_id; /* Tag for target of notify */ | u_int seq_id; /* Tag for target of notify */ | ||||
u_int initiator_id; /* Initiator Identifier */ | u_int initiator_id; /* Initiator Identifier */ | ||||
u_int arg; /* Function specific */ | u_int arg; /* Function specific */ | ||||
}; | }; | ||||
Show All 27 Lines | |||||
typedef enum { | typedef enum { | ||||
EAD_VUNIQUE, /* Engine algorithm ID: vendor unique */ | EAD_VUNIQUE, /* Engine algorithm ID: vendor unique */ | ||||
EAD_LZ1V1, /* Engine algorithm ID: LZ1 var.1 */ | EAD_LZ1V1, /* Engine algorithm ID: LZ1 var.1 */ | ||||
EAD_LZ2V1, /* Engine algorithm ID: LZ2 var.1 */ | EAD_LZ2V1, /* Engine algorithm ID: LZ2 var.1 */ | ||||
EAD_LZ2V2 /* Engine algorithm ID: LZ2 var.2 */ | EAD_LZ2V2 /* Engine algorithm ID: LZ2 var.2 */ | ||||
} ei_algo; | } ei_algo; | ||||
struct ccb_eng_inq { | |||||
struct ccb_hdr ccb_h; | |||||
u_int16_t eng_num; /* The engine number for this inquiry */ | |||||
ei_type eng_type; /* Returned engine type */ | |||||
ei_algo eng_algo; /* Returned engine algorithm type */ | |||||
u_int32_t eng_memeory; /* Returned engine memory size */ | |||||
}; | |||||
struct ccb_eng_exec { /* This structure must match SCSIIO size */ | |||||
struct ccb_hdr ccb_h; | |||||
u_int8_t *pdrv_ptr; /* Ptr used by the peripheral driver */ | |||||
u_int8_t *req_map; /* Ptr for mapping info on the req. */ | |||||
u_int8_t *data_ptr; /* Pointer to the data buf/SG list */ | |||||
u_int32_t dxfer_len; /* Data transfer length */ | |||||
u_int8_t *engdata_ptr; /* Pointer to the engine buffer data */ | |||||
u_int16_t sglist_cnt; /* Num of scatter gather list entries */ | |||||
u_int32_t dmax_len; /* Destination data maximum length */ | |||||
u_int32_t dest_len; /* Destination data length */ | |||||
int32_t src_resid; /* Source residual length: 2's comp */ | |||||
u_int32_t timeout; /* Timeout value */ | |||||
u_int16_t eng_num; /* Engine number for this request */ | |||||
u_int16_t vu_flags; /* Vendor Unique flags */ | |||||
}; | |||||
/* | /* | ||||
* Definitions for the timeout field in the SCSI I/O CCB. | * Definitions for the timeout field in the SCSI I/O CCB. | ||||
*/ | */ | ||||
#define CAM_TIME_DEFAULT 0x00000000 /* Use SIM default value */ | #define CAM_TIME_DEFAULT 0x00000000 /* Use SIM default value */ | ||||
#define CAM_TIME_INFINITY 0xFFFFFFFF /* Infinite timeout */ | #define CAM_TIME_INFINITY 0xFFFFFFFF /* Infinite timeout */ | ||||
#define CAM_SUCCESS 0 /* For signaling general success */ | #define CAM_SUCCESS 0 /* For signaling general success */ | ||||
#define CAM_FAILURE 1 /* For signaling general failure */ | #define CAM_FAILURE 1 /* For signaling general failure */ | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | union ccb { | ||||
struct ccb_termio tio; | struct ccb_termio tio; | ||||
struct ccb_accept_tio atio; | struct ccb_accept_tio atio; | ||||
struct ccb_scsiio ctio; | struct ccb_scsiio ctio; | ||||
struct ccb_en_lun cel; | struct ccb_en_lun cel; | ||||
struct ccb_immed_notify cin; | struct ccb_immed_notify cin; | ||||
struct ccb_notify_ack cna; | struct ccb_notify_ack cna; | ||||
struct ccb_immediate_notify cin1; | struct ccb_immediate_notify cin1; | ||||
struct ccb_notify_acknowledge cna2; | struct ccb_notify_acknowledge cna2; | ||||
struct ccb_eng_inq cei; | |||||
struct ccb_eng_exec cee; | |||||
struct ccb_smpio smpio; | struct ccb_smpio smpio; | ||||
struct ccb_rescan crcn; | struct ccb_rescan crcn; | ||||
struct ccb_debug cdbg; | struct ccb_debug cdbg; | ||||
struct ccb_ataio ataio; | struct ccb_ataio ataio; | ||||
struct ccb_dev_advinfo cdai; | struct ccb_dev_advinfo cdai; | ||||
struct ccb_async casync; | struct ccb_async casync; | ||||
struct ccb_nvmeio nvmeio; | struct ccb_nvmeio nvmeio; | ||||
struct ccb_mmcio mmcio; | struct ccb_mmcio mmcio; | ||||
▲ Show 20 Lines • Show All 172 Lines • Show Last 20 Lines |
I am curios why you've removed resetbus, but left resetdev. Obviously the last one is used in virtio_scsi, but if we assume that every opcode should have its structure, then both should stay, even if they are identical.