38#include <sys/malloc.h>
39#include <sys/kernel.h>
42#include <sys/devctl.h>
47#include <sys/devicestat.h>
49#include <sys/sysctl.h>
51#include <vm/vm_extern.h>
67 u_int newunit,
bool wired,
80 u_int32_t sense_flags,
82 u_int32_t *relsim_flags,
85 const char **action_string);
89 u_int32_t sense_flags,
91 u_int32_t *relsim_flags,
94 const char **action_string);
123 newdrivers = malloc(
sizeof(*newdrivers) * ndrivers, M_CAMPERIPH,
131 free(newdrivers, M_CAMPERIPH);
144 free(old, M_CAMPERIPH);
160 if (drv->
deinit == NULL) {
161 printf(
"CAM periph driver '%s' doesn't have deinit.\n",
174 (
"Periph driver '%s' was not registered", drv->
driver_name));
229 printf(
"cam_periph_alloc: attempt to re-allocate "
230 "valid device %s%d rejected flags %#x "
238 periph = (
struct cam_periph *)malloc(
sizeof(*periph), M_CAMPERIPH,
259 SLIST_INIT(&periph->ccb_list);
267 if (strcmp((*p_drv)->driver_name, name) == 0)
270 if (*p_drv == NULL) {
271 printf(
"cam_periph_alloc: invalid periph name '%s'\n", name);
274 free(periph, M_CAMPERIPH);
279 cur_periph = TAILQ_FIRST(&(*p_drv)->units);
280 while (cur_periph != NULL
282 cur_periph = TAILQ_NEXT(cur_periph, unit_links);
283 if (cur_periph != NULL) {
285 (
"duplicate units on periph list"));
286 TAILQ_INSERT_BEFORE(cur_periph, periph, unit_links);
288 TAILQ_INSERT_TAIL(&(*p_drv)->units, periph, unit_links);
289 (*p_drv)->generation++;
302 status = periph_ctor(periph, arg);
308 switch (init_level) {
318 TAILQ_REMOVE(&(*p_drv)->units, periph, unit_links);
323 free(periph, M_CAMPERIPH);
329 panic(
"%s: Unknown init level", __func__);
347 if (name != NULL && (strcmp((*p_drv)->driver_name, name) != 0))
350 TAILQ_FOREACH(periph, &(*p_drv)->units, unit_links) {
372 struct sbuf local_sb;
380 sbuf_new(&local_sb, NULL, sbuf_alloc_len, SBUF_FIXEDLEN);
384 TAILQ_FOREACH(periph, &(*p_drv)->units, unit_links) {
388 if (sbuf_len(&local_sb) != 0)
389 sbuf_cat(&local_sb,
",");
391 sbuf_printf(&local_sb,
"%s%d", periph->
periph_name,
394 if (sbuf_error(&local_sb) == ENOMEM) {
397 sbuf_delete(&local_sb);
404 sbuf_finish(&local_sb);
405 if (sbuf_len(sb) != 0)
407 sbuf_cat(sb, sbuf_data(&local_sb));
408 sbuf_delete(&local_sb);
437 (
"cam_periph_doacquire() with refcount == %d", periph->
refcount));
447 KASSERT(periph->
refcount >= 1, (
"periph->refcount >= 1"));
504 "caplck", 0)) != 0) {
524 periph->
flags &= ~CAM_PERIPH_LOCKED;
526 periph->
flags &= ~CAM_PERIPH_LOCK_WANTED;
547 int i, val, dunit, r;
548 const char *dname, *strval;
552 for (periph = TAILQ_FIRST(&p_drv->units);
554 periph = TAILQ_NEXT(periph, unit_links))
557 if (periph != NULL && periph->
unit_number == newunit) {
562 "device at scbus%d target %d lun %d) will "
581 r = resource_find_dev(&i, dname, &dunit, NULL, NULL);
585 if (newunit != dunit)
587 if (resource_string_value(dname, dunit,
"sn", &strval) == 0 ||
588 resource_int_value(dname, dunit,
"lun", &val) == 0 ||
589 resource_int_value(dname, dunit,
"target", &val) == 0 ||
590 resource_string_value(dname, dunit,
"at", &strval) == 0)
606 const char *dname, *strval;
610 snprintf(pathbuf,
sizeof(pathbuf),
"scbus%d", pathid);
615 for (wired =
false; resource_find_dev(&i, dname, &dunit, NULL, NULL) == 0;
617 if (resource_string_value(dname, dunit,
"at", &strval) == 0) {
618 if (strcmp(strval, pathbuf) != 0)
622 if (resource_int_value(dname, dunit,
"target", &val) == 0) {
627 if (resource_int_value(dname, dunit,
"lun", &val) == 0) {
632 if (resource_string_value(dname, dunit,
"sn", &strval) == 0) {
633 if (sn == NULL || strcmp(strval, sn) != 0)
671 sbuf_new(&sb, buffer, 160, SBUF_FIXEDLEN);
677 periph->
flags &= ~CAM_PERIPH_NEW_DEV_FOUND;
693 if (strcmp((*p_drv)->driver_name, periph->
periph_name) == 0)
696 if (*p_drv == NULL) {
697 printf(
"camperiphfree: attempt to free non-existant periph\n");
746 TAILQ_REMOVE(&drv->units, periph, unit_links);
761 memset(&
ccb, 0,
sizeof(
ccb));
781 free(periph, M_CAMPERIPH);
801 bzero(mapinfo,
sizeof(*mapinfo));
804 else if (maxmap > maxphys)
809 printf(
"cam_periph_mapmem: invalid match buffer "
858 data_ptrs[0] = (
unsigned char **)&
ccb->
mmcio.
cmd.data;
859 lengths[0] =
sizeof(
struct mmc_data *);
861 data_ptrs[1] = (
unsigned char **)&
ccb->
mmcio.
cmd.data->data;
910 for (i = 0; i < numbufs; i++) {
911 if (lengths[i] > maxmap) {
912 printf(
"cam_periph_mapmem: attempt to map %lu bytes, "
913 "which is greater than %lu\n",
914 (
long)(lengths[i]), (u_long)maxmap);
929 for (i = 0; i < numbufs; i++) {
931 mapinfo->
orig[i] = *data_ptrs[i];
941 *data_ptrs[i] = malloc(lengths[i], M_CAMPERIPH,
944 if (copyin(mapinfo->
orig[i], *data_ptrs[i],
946 free(*data_ptrs[i], M_CAMPERIPH);
947 *data_ptrs[i] = mapinfo->
orig[i];
951 bzero(*data_ptrs[i], lengths[i]);
958 mapinfo->
bp[i] = uma_zalloc(pbuf_zone, M_WAITOK);
962 BIO_WRITE : BIO_READ;
965 if (vmapbuf(mapinfo->
bp[i], *data_ptrs[i], lengths[i], 1) < 0) {
966 uma_zfree(pbuf_zone, mapinfo->
bp[i]);
971 *data_ptrs[i] = mapinfo->
bp[i]->b_data;
979 for (i = 0; i < numbufs; i++) {
981 BUF_KERNPROC(mapinfo->
bp[i]);
988 for (i--; i >= 0; i--) {
989 if (mapinfo->
bp[i]) {
990 vunmapbuf(mapinfo->
bp[i]);
991 uma_zfree(pbuf_zone, mapinfo->
bp[i]);
993 free(*data_ptrs[i], M_CAMPERIPH);
994 *data_ptrs[i] = mapinfo->
orig[i];
1049 lengths[0] =
sizeof(
struct mmc_data *);
1051 data_ptrs[1] = (u_int8_t **)&
ccb->
mmcio.
cmd.data->data;
1085 for (i = 0; i < numbufs; i++) {
1086 if (mapinfo->
bp[i]) {
1088 vunmapbuf(mapinfo->
bp[i]);
1091 uma_zfree(pbuf_zone, mapinfo->
bp[i]);
1094 copyout(*data_ptrs[i], mapinfo->
orig[i],
1097 free(*data_ptrs[i], M_CAMPERIPH);
1101 *data_ptrs[i] = mapinfo->
orig[i];
1110 int (*error_routine)(
union ccb *
ccb,
1112 u_int32_t sense_flags))
1135 while (found == 0) {
1156 bcopy(
ccb, addr,
sizeof(
union ccb));
1173 panic(
"%s: already done with ccb %p", __func__, done_ccb);
1193 PRIBIO,
"cbwait", 0);
1197 (
"%s: proceeding with incomplete ccb: ccb=%p, func_code=%#x, "
1208 int (*error_routine)(
union ccb *
ccb,
1210 u_int32_t sense_flags),
1211 cam_flags camflags, u_int32_t sense_flags,
1214 struct bintime *starttime;
1215 struct bintime ltime;
1218 uint32_t timeout = 1;
1223 (
"%s: ccb=%p, func_code=%#x, flags=%#x", __func__,
ccb,
1235 binuptime(starttime);
1236 devstat_start_transaction(ds, starttime);
1254 must_poll = dumping || SCHEDULER_STOPPED();
1284 else if (error_routine != NULL) {
1286 error = (*error_routine)(
ccb, camflags, sense_flags);
1289 }
while (error == ERESTART);
1303 devstat_tag_type tag;
1311 tag = (devstat_tag_type)0;
1314 tag = (devstat_tag_type)0;
1319 devstat_end_transaction(ds, bytes, tag,
1322 DEVSTAT_WRITE : DEVSTAT_READ, NULL, starttime);
1334 memset(&ccb_h, 0,
sizeof(ccb_h));
1343 u_int32_t openings, u_int32_t arg,
1349 relsim_flags,
openings, arg, getcount_only));
1350 memset(&crs, 0,
sizeof(crs));
1361#define saved_ccb_ptr ppriv_ptr0
1365 union ccb *saved_ccb;
1368 int error = 0, error_code, sense_key, asc, ascq;
1369 u_int16_t done_flags;
1377 &error_code, &sense_key, &asc, &ascq)) {
1389 (asc == 0x24) && (ascq == 0x00)) {
1390 scsi_cmd->
how &= ~SSS_LOEJ;
1403 if (error == ERESTART)
1424 periph->
flags &= ~CAM_PERIPH_RECOVERY_WAIT;
1443 saved_ccb = (
union ccb *)done_ccb->
ccb_h.saved_ccb_ptr;
1445 (
"%s: saved_ccb func_code %#x != XPT_SCSI_IO",
1448 (
"%s: done_ccb func_code %#x != XPT_SCSI_IO",
1451 bcopy(saved_ccb, done_ccb,
sizeof(
struct ccb_scsiio));
1455 periph->
flags &= ~CAM_PERIPH_RECOVERY_INPROG;
1488 memset(&cgds, 0,
sizeof(cgds));
1497 struct timeval* event_time, u_int duration_ms)
1499 struct timeval delta;
1500 struct timeval duration_tv;
1502 if (!timevalisset(event_time))
1506 timevalsub(&delta, event_time);
1507 duration_tv.tv_sec = duration_ms / 1000;
1508 duration_tv.tv_usec = (duration_ms % 1000) * 1000;
1509 if (timevalcmp(&delta, &duration_tv, <)) {
1510 timevalsub(&duration_tv, &delta);
1512 duration_ms = duration_tv.tv_sec * 1000;
1513 duration_ms += duration_tv.tv_usec / 1000;
1526 cam_flags camflags, u_int32_t sense_flags,
1527 int *openings, u_int32_t *relsim_flags,
1528 u_int32_t *timeout, u_int32_t *action,
const char **action_string)
1560 memset(&cgds, 0,
sizeof(cgds));
1585 if (*openings < total_openings)
1604 *action &= ~SSQ_PRINT_SENSE;
1617 *action_string =
"Periph was invalidated";
1628 *action_string =
"Retries exhausted";
1641 cam_flags camflags, u_int32_t sense_flags,
1642 int *openings, u_int32_t *relsim_flags,
1643 u_int32_t *timeout, u_int32_t *action,
const char **action_string)
1646 union ccb *orig_ccb =
ccb;
1647 int error, recoveryccb;
1650#if defined(BUF_TRACKING) || defined(FULL_BUF_TRACKING)
1652 biotrack(
ccb->
csio.bio, __func__);
1672 *action &= ~SSQ_PRINT_SENSE;
1680 memset(&cgd, 0,
sizeof(cgd));
1695 *action_string =
"Will not autostart a "
1696 "sequential access device";
1697 goto sense_error_done;
1723 *action_string =
"Retries exhausted";
1724 goto sense_error_done;
1734 if (orig_ccb == NULL) {
1735 *action_string =
"Can't allocate recovery CCB";
1736 goto sense_error_done;
1745 (
"%s: ccb func_code %#x != XPT_SCSI_IO",
1752 switch (err_action &
SS_MASK) {
1754 *action_string =
"No recovery action needed";
1758 *action_string =
"Retrying command (per sense data)";
1762 *action_string =
"Unretryable error";
1772 *action_string =
"Attempting to start unit";
1810 *action_string =
"Polling device for readiness";
1813 *action_string =
"Testing device for readiness";
1833 panic(
"Unhandled error action %x", err_action);
1847 ccb->
ccb_h.saved_ccb_ptr = orig_ccb;
1853 *action = err_action;
1865 u_int32_t sense_flags)
1868 union ccb *orig_ccb, *scan_ccb;
1870 const char *action_string;
1872 int frozen, error, openings, devctl_err;
1873 u_int32_t action, relsim_flags, timeout;
1877 action_string = NULL;
1881 devctl_err = openings = relsim_flags = timeout = 0;
1904 action &= ~SSQ_PRINT_SENSE;
1908 camflags, sense_flags, &openings, &relsim_flags,
1909 &timeout, &action, &action_string);
1935 action_string =
"Retries exhausted";
1965 action_string =
"Periph was invalidated";
1969 action_string =
"Retry was blocked";
1972 action &= ~SSQ_PRINT_SENSE;
1995 action_string =
"Periph was invalidated";
1998 action_string =
"Retries exhausted";
2001 action_string =
"Retry was blocked";
2013 action &= ~SSQ_PRINT_SENSE;
2017 if (error != ERESTART) {
2018 if (action_string == NULL)
2019 action_string =
"Unretryable error";
2021 error, action_string);
2022 }
else if (action_string != NULL)
2026 "Retrying command, %d more tries remain\n",
2063 if ((action &
SSQ_UA) != 0)
2073 if (scan_ccb != NULL) {
2080 "Can't allocate CCB to rescan target\n");
2087 if (error == ERESTART || error == 0) {
2090 if (error == ERESTART)
2103#define CAM_PERIPH_DEVD_MSG_SIZE 256
2111 int serr, sk, asc, ascq;
2121 sbuf_printf(&sb,
"device=%s%d ", periph->
periph_name,
2124 sbuf_printf(&sb,
"serial=\"");
2132 sbuf_bcat(&sb, cgd->serial_num, cgd->serial_num_len);
2135 sbuf_printf(&sb,
"\" ");
2146 sbuf_printf(&sb,
"scsi_sense=\"%02x %02x %02x %02x\" ",
2147 serr, sk, asc, ascq);
2151 sbuf_printf(&sb,
"RES=\"");
2153 sbuf_printf(&sb,
"\" ");
2162 sbuf_printf(&sb,
"CDB=\"");
2164 sbuf_printf(&sb,
"\" ");
2166 sbuf_printf(&sb,
"ACB=\"");
2168 sbuf_printf(&sb,
"\" ");
2171 if (sbuf_finish(&sb) == 0)
2172 devctl_notify(
"CAM",
"periph", type, sbuf_data(&sb));
2174 free(sbmsg, M_CAMPERIPH);
2189 error = sysctl_handle_int(oidp, &value, 0, req);
2190 if (error != 0 || req->newptr == NULL || value != 1)
int ata_res_sbuf(struct ata_res *res, struct sbuf *sb)
void ata_cmd_sbuf(struct ata_cmd *cmd, struct sbuf *sb)
void cam_error_print(union ccb *ccb, cam_error_string_flags flags, cam_error_proto_flags proto_flags)
#define CAM_PRIORITY_NORMAL
#define CAM_PRIORITY_NONE
#define CAM_UNQUEUED_INDEX
@ CAM_GDEVLIST_LAST_DEVICE
#define RELSIM_RELEASE_AFTER_TIMEOUT
#define RELSIM_ADJUST_OPENINGS
void ac_callback_t(void *softc, u_int32_t code, struct cam_path *path, void *args)
static __inline uint8_t * scsiio_cdb_ptr(struct ccb_scsiio *ccb)
#define RELSIM_RELEASE_AFTER_CMDCMPLT
#define CAM_DEBUG(path, flag, printfargs)
#define CAM_DEBUGGED(path, flag)
void cam_periph_release_locked(struct cam_periph *periph)
int cam_periph_list(struct cam_path *path, struct sbuf *sb)
static u_int periph_mapmem_thresh
void periphdriver_init(int level)
static u_int camperiphunit(struct periph_driver *p_drv, path_id_t pathid, target_id_t target, lun_id_t lun, const char *sn)
void cam_freeze_devq(struct cam_path *path)
int periphdriver_unregister(void *data)
struct cam_periph * cam_periph_find(struct cam_path *path, char *name)
static int periph_noresrc_delay
u_int32_t cam_release_devq(struct cam_path *path, u_int32_t relsim_flags, u_int32_t openings, u_int32_t arg, int getcount_only)
static void cam_periph_done_panic(struct cam_periph *periph, union ccb *done_ccb)
static void cam_periph_ccbwait(union ccb *ccb)
static void cam_periph_devctl_notify(union ccb *ccb)
void periphdriver_register(void *data)
static int nperiph_drivers
TUNABLE_INT("kern.cam.periph_selto_delay", &periph_selto_delay)
void cam_periph_unmapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
int cam_periph_acquire(struct cam_periph *periph)
SYSCTL_UINT(_kern_cam, OID_AUTO, mapmem_thresh, CTLFLAG_RWTUN, &periph_mapmem_thresh, 0, "Threshold for user-space buffer mapping")
void cam_periph_doacquire(struct cam_periph *periph)
static int periph_selto_delay
#define CAM_PERIPH_DEVD_MSG_SIZE
static int periph_busy_delay
void cam_periph_freeze_after_event(struct cam_periph *periph, struct timeval *event_time, u_int duration_ms)
void cam_periph_async(struct cam_periph *periph, u_int32_t code, struct cam_path *path, void *arg)
void cam_periph_release(struct cam_periph *periph)
static void camperiphdone(struct cam_periph *periph, union ccb *done_ccb)
void cam_periph_unhold(struct cam_periph *periph)
static int camperiphscsisenseerror(union ccb *ccb, union ccb **orig_ccb, cam_flags camflags, u_int32_t sense_flags, int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, u_int32_t *action, const char **action_string)
static u_int camperiphnextunit(struct periph_driver *p_drv, u_int newunit, bool wired, path_id_t pathid, target_id_t target, lun_id_t lun)
static void cam_periph_done(struct cam_periph *periph, union ccb *done_ccb)
int cam_periph_hold(struct cam_periph *periph, int priority)
int cam_periph_runccb(union ccb *ccb, int(*error_routine)(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags), cam_flags camflags, u_int32_t sense_flags, struct devstat *ds)
static MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers")
int cam_periph_invalidate_sysctl(SYSCTL_HANDLER_ARGS)
void cam_periph_invalidate(struct cam_periph *periph)
struct periph_driver ** periph_drivers
int cam_periph_error(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags)
static void camperiphfree(struct cam_periph *periph)
int cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo, u_int maxmap)
void cam_periph_bus_settle(struct cam_periph *periph, u_int bus_settle)
void cam_periph_release_locked_buses(struct cam_periph *periph)
int cam_periph_ioctl(struct cam_periph *periph, u_long cmd, caddr_t addr, int(*error_routine)(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags))
cam_status cam_periph_alloc(periph_ctor_t *periph_ctor, periph_oninv_t *periph_oninvalidate, periph_dtor_t *periph_dtor, periph_start_t *periph_start, char *name, cam_periph_type type, struct cam_path *path, ac_callback_t *ac_callback, ac_code code, void *arg)
static int camperiphscsistatuserror(union ccb *ccb, union ccb **orig_ccb, cam_flags camflags, u_int32_t sense_flags, int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, u_int32_t *action, const char **action_string)
cam_status periph_ctor_t(struct cam_periph *periph, void *arg)
#define CAM_PERIPH_INVALID
void periph_oninv_t(struct cam_periph *periph)
#define cam_periph_assert(periph, what)
#define CAM_PERIPH_RECOVERY_INPROG
#define CAM_PERIPH_LOCK_WANTED
#define cam_periph_lock(periph)
#define CAM_PERIPH_MAXMAPS
#define CAM_PERIPH_DRV_EARLY
union ccb * cam_periph_getccb(struct cam_periph *periph, u_int32_t priority)
#define CAM_PERIPH_NEW_DEV_FOUND
#define cam_periph_unlock(periph)
static __inline struct mtx * cam_periph_mtx(struct cam_periph *periph)
#define CAM_PERIPH_LOCKED
void periph_dtor_t(struct cam_periph *periph)
#define CAM_PERIPH_RECOVERY_WAIT_FAILED
void periph_start_t(struct cam_periph *periph, union ccb *start_ccb)
#define CAM_PERIPH_ANNOUNCED
#define cam_periph_sleep(periph, chan, priority, wmesg, timo)
#define CAM_PERIPH_RECOVERY_WAIT
static __inline bool cam_sim_pollable(const struct cam_sim *sim)
void xpt_denounce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb)
cam_status xpt_create_path(struct cam_path **new_path_ptr, struct cam_periph *perph, path_id_t path_id, target_id_t target_id, lun_id_t lun_id)
int32_t xpt_add_periph(struct cam_periph *periph)
void xpt_unlock_buses(void)
void xpt_print(struct cam_path *path, const char *fmt,...)
void xpt_pollwait(union ccb *start_ccb, uint32_t timeout)
void xpt_rescan(union ccb *ccb)
int xpt_path_comp(struct cam_path *path1, struct cam_path *path2)
path_id_t xpt_path_path_id(struct cam_path *path)
void xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg)
void xpt_lock_buses(void)
void xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority)
void xpt_action(union ccb *start_ccb)
uint32_t xpt_poll_setup(union ccb *start_ccb)
lun_id_t xpt_path_lun_id(struct cam_path *path)
struct cam_sim * xpt_path_sim(struct cam_path *path)
union ccb * xpt_alloc_ccb_nowait(void)
void xpt_free_path(struct cam_path *path)
struct cam_periph * xpt_path_periph(struct cam_path *path)
void xpt_release_ccb(union ccb *free_ccb)
target_id_t xpt_path_target_id(struct cam_path *path)
void xpt_free_ccb(union ccb *free_ccb)
void xpt_remove_periph(struct cam_periph *periph)
#define xpt_path_assert(path, what)
static void xpt_path_inq(struct ccb_pathinq *cpi, struct cam_path *path)
#define xpt_path_sleep(path, chan, priority, wmesg, timo)
void scsi_cdb_sbuf(u_int8_t *cdb_ptr, struct sbuf *sb)
int scsi_extract_sense_ccb(union ccb *ccb, int *error_code, int *sense_key, int *asc, int *ascq)
void scsi_test_unit_ready(struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t sense_len, u_int32_t timeout)
void scsi_start_stop(struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, int start, int load_eject, int immediate, u_int8_t sense_len, u_int32_t timeout)
scsi_sense_action scsi_error_action(struct ccb_scsiio *csio, struct scsi_inquiry_data *inq_data, u_int32_t sense_flags)
#define SID_IS_REMOVABLE(inq_data)
#define SCSI_STATUS_CMD_TERMINATED
#define SCSI_STATUS_CHECK_COND
#define SCSI_STATUS_INTERMED
#define SCSI_STATUS_COND_MET
#define SID_TYPE(inq_data)
#define SCSI_STATUS_RESERV_CONFLICT
#define SCSI_STATUS_INTERMED_COND_MET
#define SCSI_STATUS_QUEUE_FULL
void * orig[CAM_PERIPH_MAXMAPS]
struct buf * bp[CAM_PERIPH_MAXMAPS]
periph_start_t * periph_start
periph_dtor_t * periph_dtor
uint32_t scheduled_priority
ac_callback_t * deferred_callback
periph_oninv_t * periph_oninval
uint32_t immediate_priority
struct dev_match_result * matches
u_int32_t pattern_buf_len
struct dev_match_pattern * patterns
struct scsi_inquiry_data inq_data
char periph_name[DEV_IDLEN]
ccb_getdevlist_status_e status
struct timeval last_reset
void(* cbfcnp)(struct cam_periph *, union ccb *)
u_int32_t release_timeout
struct ccb_getdevlist cgdl
struct ccb_dev_advinfo cdai
u_int8_t cdb_bytes[IOCDBLEN]