Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_ccb.h
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | /* Common function commands: 0x00->0x0F */ | ||||
XPT_DEV_MATCH = 0x09 | XPT_FC_XPT_ONLY, | XPT_DEV_MATCH = 0x09 | XPT_FC_XPT_ONLY, | ||||
/* Get EDT entries matching the given pattern */ | /* Get EDT entries matching the given pattern */ | ||||
XPT_DEBUG = 0x0a, | XPT_DEBUG = 0x0a, | ||||
/* Turn on debugging for a bus, target or lun */ | /* Turn on debugging for a bus, target or lun */ | ||||
XPT_PATH_STATS = 0x0b, | XPT_PATH_STATS = 0x0b, | ||||
/* Path statistics (error counts, etc.) */ | /* Path statistics (error counts, etc.) */ | ||||
XPT_GDEV_STATS = 0x0c, | XPT_GDEV_STATS = 0x0c, | ||||
/* Device statistics (error counts, etc.) */ | /* Device statistics (error counts, etc.) */ | ||||
XPT_DEFERRED_CALLBACK = 0x0d | XPT_FC_QUEUED | XPT_FC_USER_CCB | |||||
| XPT_FC_XPT_ONLY, | |||||
/* Deferred callback */ | |||||
XPT_DEV_ADVINFO = 0x0e, | XPT_DEV_ADVINFO = 0x0e, | ||||
/* Get/Set Device advanced information */ | /* Get/Set Device advanced information */ | ||||
XPT_ASYNC = 0x0f | XPT_FC_QUEUED | XPT_FC_USER_CCB | XPT_ASYNC = 0x0f | XPT_FC_QUEUED | XPT_FC_USER_CCB | ||||
| XPT_FC_XPT_ONLY, | | XPT_FC_XPT_ONLY, | ||||
/* Asynchronous event */ | /* Asynchronous event */ | ||||
/* SCSI Control Functions: 0x10->0x1F */ | /* SCSI Control Functions: 0x10->0x1F */ | ||||
XPT_ABORT = 0x10, | XPT_ABORT = 0x10, | ||||
/* Abort the specified CCB */ | /* Abort the specified CCB */ | ||||
▲ Show 20 Lines • Show All 1,158 Lines • ▼ Show 20 Lines | |||||
struct ccb_async { | struct ccb_async { | ||||
struct ccb_hdr ccb_h; | struct ccb_hdr ccb_h; | ||||
uint32_t async_code; | uint32_t async_code; | ||||
off_t async_arg_size; | off_t async_arg_size; | ||||
void *async_arg_ptr; | void *async_arg_ptr; | ||||
}; | }; | ||||
/* | /* | ||||
* CCB for sending deferred calls to a specific async callback that needs to be | |||||
* deferred to the async thread. | |||||
*/ | |||||
struct ccb_deferred_callback { | |||||
struct ccb_hdr ccb_h; | |||||
ac_callback_t *deferred_callback; | |||||
uint32_t code; /* an async code */ | |||||
off_t arg_size; | |||||
void *arg_ptr; | |||||
}; | |||||
/* | |||||
* Union of all CCB types for kernel space allocation. This union should | * Union of all CCB types for kernel space allocation. This union should | ||||
* never be used for manipulating CCBs - its only use is for the allocation | * never be used for manipulating CCBs - its only use is for the allocation | ||||
* and deallocation of raw CCB space and is the return type of xpt_ccb_alloc | * and deallocation of raw CCB space and is the return type of xpt_ccb_alloc | ||||
* and the argument to xpt_ccb_free. | * and the argument to xpt_ccb_free. | ||||
*/ | */ | ||||
union ccb { | union ccb { | ||||
struct ccb_hdr ccb_h; /* For convenience */ | struct ccb_hdr ccb_h; /* For convenience */ | ||||
struct ccb_scsiio csio; | struct ccb_scsiio csio; | ||||
Show All 23 Lines | union ccb { | ||||
struct ccb_eng_inq cei; | struct ccb_eng_inq cei; | ||||
struct ccb_eng_exec cee; | 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_deferred_callback cdc; | |||||
struct ccb_nvmeio nvmeio; | struct ccb_nvmeio nvmeio; | ||||
struct ccb_mmcio mmcio; | struct ccb_mmcio mmcio; | ||||
}; | }; | ||||
#define CCB_CLEAR_ALL_EXCEPT_HDR(ccbp) \ | #define CCB_CLEAR_ALL_EXCEPT_HDR(ccbp) \ | ||||
bzero((char *)(ccbp) + sizeof((ccbp)->ccb_h), \ | bzero((char *)(ccbp) + sizeof((ccbp)->ccb_h), \ | ||||
sizeof(*(ccbp)) - sizeof((ccbp)->ccb_h)) | sizeof(*(ccbp)) - sizeof((ccbp)->ccb_h)) | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |