39#include <sys/malloc.h>
40#include <sys/kernel.h>
49#include <sys/sysctl.h>
65#include <machine/stdarg.h>
71#define CAM_QUIRK_NOLUNS 0x01
72#define CAM_QUIRK_NOVPDS 0x02
73#define CAM_QUIRK_HILUNS 0x04
74#define CAM_QUIRK_NOHILUNS 0x08
75#define CAM_QUIRK_NORPTLUNS 0x10
79#define SCSI_QUIRK(dev) ((struct scsi_quirk_entry *)((dev)->quirk))
83 &
cam_srch_hi, 0,
"Search above LUN 7 for SCSI3 and greater devices");
85#define CAM_SCSI2_MAXLUN 8
86#define CAM_CAN_GET_SIMPLE_LUN(x, i) \
87 ((((x)->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) == \
88 RPL_LUNDATA_ATYP_PERIPH) || \
89 (((x)->luns[i].lundata[0] & RPL_LUNDATA_ATYP_MASK) == \
90 RPL_LUNDATA_ATYP_FLAT))
91#define CAM_GET_SIMPLE_LUN(lp, i, lval) \
92 if (((lp)->luns[(i)].lundata[0] & RPL_LUNDATA_ATYP_MASK) == \
93 RPL_LUNDATA_ATYP_PERIPH) { \
94 (lval) = (lp)->luns[(i)].lundata[1]; \
96 (lval) = (lp)->luns[(i)].lundata[0]; \
97 (lval) &= RPL_LUNDATA_FLAT_LUN_MASK; \
99 (lval) |= (lp)->luns[(i)].lundata[1]; \
101#define CAM_GET_LUN(lp, i, lval) \
102 (lval) = scsi_8btou64((lp)->luns[(i)].lundata); \
103 (lval) = CAM_EXTLUN_BYTE_SWIZZLE(lval);
112#define CAN_SRCH_HI_SPARSE(dv) \
113 (((SCSI_QUIRK(dv)->quirks & CAM_QUIRK_NOHILUNS) == 0) \
114 && ((SCSI_QUIRK(dv)->quirks & CAM_QUIRK_HILUNS) \
115 || (SID_ANSI_REV(&dv->inq_data) > SCSI_REV_2 && cam_srch_hi)))
117#define CAN_SRCH_HI_DENSE(dv) \
118 (((SCSI_QUIRK(dv)->quirks & CAM_QUIRK_NOHILUNS) == 0) \
119 && ((SCSI_QUIRK(dv)->quirks & CAM_QUIRK_HILUNS) \
120 || (SID_ANSI_REV(&dv->inq_data) > SCSI_REV_2)))
154 "PROBE_FULL_INQUIRY",
157 "PROBE_SUPPORTED_VPD_LIST",
159 "PROBE_EXTENDED_INQUIRY",
161 "PROBE_TUR_FOR_NEGOTIATION",
162 "PROBE_INQUIRY_BASIC_DV1",
163 "PROBE_INQUIRY_BASIC_DV2",
169#define PROBE_SET_ACTION(softc, newaction) \
172 text = probe_action_text; \
173 CAM_DEBUG((softc)->periph->path, CAM_DEBUG_PROBE, \
174 ("Probe %s to %s\n", text[(softc)->action], \
175 text[(newaction)])); \
176 (softc)->action = (newaction); \
195static const char sony[] =
"SONY";
614#define SCSI_XPT_XPORT(x, X) \
615static struct xpt_xport scsi_xport_ ## x = { \
616 .xport = XPORT_ ## X, \
618 .ops = &scsi_xport_ops, \
620CAM_XPT_XPORT(scsi_xport_ ## x);
630#undef SCSI_XPORT_XPORT
654 union ccb *request_ccb;
657 request_ccb = (
union ccb *)arg;
658 if (request_ccb == NULL) {
659 printf(
"proberegister: no probe CCB, "
660 "can't register device\n");
664 softc = (
probe_softc *)malloc(
sizeof(*softc), M_CAMXPT, M_NOWAIT);
667 printf(
"proberegister: Unable to probe new device. "
668 "Unable to allocate softc\n");
671 TAILQ_INIT(&softc->request_ccbs);
672 TAILQ_INSERT_TAIL(&softc->request_ccbs, &request_ccb->
ccb_h,
675 periph->
softc = softc;
676 softc->periph = periph;
703 ccb = (
union ccb *)TAILQ_FIRST(&softc->request_ccbs);
739 softc->flags &= ~PROBE_NO_ANNOUNCE;
744 softc->flags &= ~PROBE_EXTLUN;
759 csio = &start_ccb->
csio;
762 switch (softc->action) {
792 softc->flags &= ~PROBE_INQUIRY_CKSUM;
794 MD5Init(&softc->context);
795 MD5Update(&softc->context, (
unsigned char *)inq_buf,
798 MD5Update(&softc->context,
802 MD5Final(softc->digest, &softc->context);
817 inquiry_len = roundup2(inquiry_len, 2);
836 M_CAMXPT, M_NOWAIT | M_ZERO);
841 "Unable to alloc report luns storage\n");
862 mode_buf = malloc(mode_buf_len, M_CAMXPT, M_NOWAIT);
863 if (mode_buf != NULL) {
877 xpt_print(periph->
path,
"Unable to mode sense control page - "
891 vpd_list = malloc(
sizeof(*vpd_list), M_CAMXPT,
894 if (vpd_list != NULL) {
899 (u_int8_t *)vpd_list,
948 ext_inq = malloc(
sizeof(*ext_inq), M_CAMXPT,
951 if (ext_inq != NULL) {
985 malloc(
sizeof(*serial_buf), M_CAMXPT,
988 if (serial_buf != NULL) {
993 (u_int8_t *)serial_buf,
1011 inq_buf = malloc(inquiry_len, M_CAMXPT, M_NOWAIT);
1012 if (inq_buf == NULL) {
1014 "Domain Validation\n");
1029 (u_int8_t *)inq_buf,
1038 panic(
"probestart: invalid action state 0x%x\n", softc->action);
1050 memset(&
cts, 0,
sizeof(
cts));
1072 memset(&
cts, 0,
sizeof (
cts));
1080 "failed to get current device settings\n");
1090 spi = &
cts.xport_specific.spi;
1122 (
"hit async: giving up on DV\n"));
1141 (
"setting to async for DV\n"));
1147 }
else if (bootverbose) {
1150 printf(
"setting period to 0x%x\n", spi->
sync_period);
1159 (
"DV: failed to set period 0x%x\n", spi->
sync_period));
1167#define CCB_COMPLETED_OK(ccb) (((ccb).status & CAM_STATUS_MASK) == CAM_REQ_CMP)
1184 switch (softc->action) {
1214 u_int8_t periph_qual;
1290 path->
device->
flags &= ~CAM_DEV_INQUIRY_DATA_VALID;
1316 csio = &done_ccb->
csio;
1335 }
else if (nlun > maxlun) {
1340 (
"Probe: reallocating REPORT_LUNS for %u luns\n",
1347 }
else if (nlun == 0) {
1358 (
"Probe: %u lun(s) reported\n", nlun));
1366 for (idx = 0; idx < nlun; idx++) {
1381 (
"lun 0 in position %u\n", idx));
1399 KASSERT(lp == NULL, (
"%s: lp is not NULL", __func__));
1422 csio = &done_ccb->
csio;
1428 offset = ((u_int8_t *)&mode_hdr[1])
1441 free(mode_hdr, M_CAMXPT);
1451 csio = &done_ccb->
csio;
1461 if (page_list == NULL) {
1484 free(page_list, M_CAMXPT);
1487 goto probe_device_check;
1493 uint32_t length = 0;
1495 csio = &done_ccb->
csio;
1505 if (devid == NULL) {
1528 if (devid &&
length == 0)
1529 free(devid, M_CAMXPT);
1540 csio = &done_ccb->
csio;
1549 if (ext_inq == NULL) {
1555 length = min(length,
sizeof(*ext_inq));
1556 length -= csio->
resid;
1571 if (ext_inq && length <= 0)
1572 free(ext_inq, M_CAMXPT);
1590 csio = &done_ccb->
csio;
1595 if (serial_buf == NULL) {
1600 && (serial_buf->
length > 0)) {
1603 (u_int8_t *)malloc((serial_buf->
length + 1),
1604 M_CAMXPT, M_NOWAIT);
1609 slen = serial_buf->
length - start;
1645 u_int8_t digest[16];
1657 MD5Final(digest, &context);
1658 if (bcmp(softc->digest, digest, 16) == 0)
1669 if (serial_buf != NULL)
1670 free(serial_buf, M_CAMXPT);
1718 (
"Begin Domain Validation\n"));
1727 (
"Leave Domain Validation\n"));
1761 csio = &done_ccb->
csio;
1765 "inquiry data fails comparison at DV%d step\n",
1774 free(nbuf, M_CAMXPT);
1779 free(nbuf, M_CAMXPT);
1788 (
"Leave Domain Validation Successfully\n"));
1808 panic(
"probedone: invalid action state 0x%x\n", softc->action);
1810 done_ccb = (
union ccb *)TAILQ_FIRST(&softc->request_ccbs);
1811 TAILQ_REMOVE(&softc->request_ccbs, &done_ccb->
ccb_h, periph_links.tqe);
1814 if (TAILQ_FIRST(&softc->request_ccbs) == NULL) {
1833 u_int idx1, idx2, nlun_old, nlun_new;
1837 if (path->
target == NULL) {
1852 for (idx1 = 0; idx1 < nlun_old; idx1++) {
1854 for (idx2 = 0; idx2 < nlun_new; idx2++) {
1855 nl =
new->luns[idx2].lundata;
1856 if (memcmp(nl, ol, 8) == 0) {
1860 if (idx2 < nlun_new) {
1871 if (this_lun == 0) {
1893 free(old, M_CAMXPT);
1899 free(periph->
softc, M_CAMXPT);
1914 panic(
"xpt_find_quirk: device didn't match wildcard entry!!");
1917 device->
quirk = quirk;
1940 (
"scsi_scan_bus\n"));
1946 union ccb *work_ccb, *reset_ccb;
1949 u_int low_target, max_target;
1954 if (work_ccb == NULL) {
2003 (work_ccb->
cpi.
max_target *
sizeof (u_int)), M_CAMXPT, M_ZERO|M_NOWAIT);
2004 if (scan_info == NULL) {
2011 (
"SCAN start for %p\n", scan_info));
2013 scan_info->
cpi = &work_ccb->
cpi;
2039 for (i = low_target; i <= max_target; i++) {
2041 if (i == initiator_id)
2048 printf(
"scsi_scan_bus: xpt_create_path failed"
2049 " with status %#x, bus scan halted\n",
2051 free(scan_info, M_CAMXPT);
2058 if (work_ccb == NULL) {
2060 free(scan_info, M_CAMXPT);
2071 work_ccb->
ccb_h.ppriv_ptr0 = scan_info;
2085 struct cam_ed *device, *nextdev;
2114 if (first == 0 && scan_info->
lunindex[target_id] == 0) {
2121 while (scan_info->
lunindex[target_id] < nluns) {
2140 if (scan_info->
lunindex[target_id] < nluns) {
2145 (
"next lun to try at index %u is %jx\n",
2160 while ((nextdev = TAILQ_NEXT(nextdev, links)) != NULL)
2164 if (nextdev != NULL) {
2182 if (next_target == 0) {
2215 if (scan_info->
counter == 0) {
2226 (
"SCAN done for %p\n", scan_info));
2227 free(scan_info, M_CAMXPT);
2243 printf(
"scsi_scan_bus: xpt_create_path failed"
2244 " with status %#x, bus scan halted\n",
2249 free(scan_info, M_CAMXPT);
2259 request_ccb->
ccb_h.ppriv_ptr0 = scan_info;
2264 path_id, target_id,
lun_id);
2273 printf(
"scsi_scan_bus: xpt_create_path failed "
2274 "with status %#x, halting LUN scan\n",
2283 request_ccb->
ccb_h.ppriv_ptr0 = scan_info;
2308 memset(&cpi, 0,
sizeof(cpi));
2314 if (request_ccb != NULL) {
2326 if (request_ccb != NULL) {
2333 if (request_ccb == NULL) {
2335 if (request_ccb == NULL) {
2337 "can't continue\n");
2346 "can't continue\n");
2365 TAILQ_INSERT_TAIL(&
softc->request_ccbs,
2366 &request_ccb->
ccb_h, periph_links.tqe);
2380 "returned an error, can't continue probe\n");
2435 memset(&cpi, 0,
sizeof(cpi));
2453 if (inq_buf != NULL) {
2461 for (otherdev = TAILQ_FIRST(&path->
target->ed_entries);
2463 otherdev = TAILQ_NEXT(otherdev, links)) {
2464 if (otherdev != path->
device)
2468 if (otherdev != NULL) {
2496 memset(&
cts, 0,
sizeof(
cts));
2504 cts.proto_specific.valid = 0;
2505 cts.xport_specific.valid = 0;
2519 cdai = &start_ccb->
cdai;
2622 (
void *)(uintptr_t)cdai->
buftype);
2632 (
"%s: ccb %p, func_code %#x should not be allocated "
2676 if (path == NULL || (device = path->
device) == NULL) {
2693 xpt_print(path,
"Uninitialized Protocol %x:%x?\n",
2701 "Version from %d to %d?\n",
cts->protocol_version,
2718 xpt_print(path,
"Uninitialized Transport %x:%x?\n",
2725 xpt_print(path,
"Down reving Transport "
2726 "Version from %d to %d?\n",
cts->transport_version,
2738 if (async_update == FALSE)
2744 scsi = &
cts->proto_specific.scsi;
2745 memset(&cpi, 0,
sizeof(cpi));
2759 scsi->
flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
2762 if (async_update == FALSE) {
2767 memset(&cur_cts, 0,
sizeof(cur_cts));
2775 cur_scsi = &cur_cts.proto_specific.scsi;
2777 scsi->
flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
2781 scsi->
flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
2785 if (
cts->transport ==
XPORT_SPI && async_update == FALSE) {
2790 spi = &
cts->xport_specific.spi;
2812 spi->
flags &= ~CTS_SPI_FLAGS_DISC_ENB;
2816 spi->
flags &= ~CTS_SPI_FLAGS_DISC_ENB;
2873 scsi->
flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
2906 device_tagenb = TRUE;
2908 device_tagenb = FALSE;
2911 && device_tagenb == FALSE)
2913 && device_tagenb == TRUE)) {
2929 if (async_update == FALSE)
2951 memset(&
cts, 0,
sizeof(
cts));
2957 cts.proto_specific.scsi.flags = 0;
2972 struct cam_ed *device,
void *async_arg)
3059 memset(&cpi, 0,
sizeof(cpi));
3070 &
cts->xport_specific.spi;
3082 &
cts->xport_specific.fc;
3089 &
cts->xport_specific.sas;
3100 u_int speed, freq, mb;
3102 memset(&
cts, 0,
sizeof(
cts));
3109 sbuf_printf(sb,
"%s%d: %d.%03dMB/s transfers",
3113 sbuf_printf(sb,
"%s%d: %dKB/s transfers", periph->
periph_name,
3119 spi = &
cts.xport_specific.spi;
3121 sbuf_printf(sb,
" (%d.%03dMHz%s, offset %d", freq / 1000,
3130 sbuf_printf(sb,
", ");
3132 sbuf_printf(sb,
" (");
3134 sbuf_printf(sb,
"%dbit)", 8 * (0x01 << spi->
bus_width));
3135 }
else if (freq != 0) {
3136 sbuf_printf(sb,
")");
3142 fc = &
cts.xport_specific.fc;
3144 sbuf_printf(sb,
" WWNN 0x%llx", (
long long) fc->
wwnn);
3146 sbuf_printf(sb,
" WWPN 0x%llx", (
long long) fc->
wwpn);
3148 sbuf_printf(sb,
" PortID 0x%x", fc->
port);
3150 sbuf_printf(sb,
"\n");
3157 u_int speed, freq, mb;
3159 memset(&
cts, 0,
sizeof(
cts));
3166 printf(
"%s%d: %d.%03dMB/s transfers",
3170 printf(
"%s%d: %dKB/s transfers", periph->
periph_name,
3176 spi = &
cts.xport_specific.spi;
3178 printf(
" (%d.%03dMHz%s, offset %d", freq / 1000,
3191 printf(
"%dbit)", 8 * (0x01 << spi->
bus_width));
3192 }
else if (freq != 0) {
3199 fc = &
cts.xport_specific.fc;
3201 printf(
" WWNN 0x%llx", (
long long) fc->
wwnn);
3203 printf(
" WWPN 0x%llx", (
long long) fc->
wwpn);
3205 printf(
" PortID 0x%x", fc->
port);
caddr_t cam_quirkmatch(caddr_t target, caddr_t quirk_table, int num_entries, int entry_size, cam_quirkmatch_t *comp_func)
#define CAM_TARGET_WILDCARD
#define CAM_PRIORITY_NORMAL
#define CAM_PRIORITY_NONE
#define RELSIM_RELEASE_AFTER_TIMEOUT
#define CTS_SPI_FLAGS_DISC_ENB
#define CTS_SPI_VALID_DISC
#define CTS_FC_VALID_PORT
#define CTS_SAS_VALID_SPEED
#define CTS_SPI_VALID_SYNC_RATE
#define CTS_SCSI_FLAGS_TAG_ENB
#define PROTO_VERSION_UNSPECIFIED
@ CTS_TYPE_CURRENT_SETTINGS
#define CTS_SCSI_VALID_TQ
#define CTS_FC_VALID_WWNN
#define CTS_SPI_VALID_BUS_WIDTH
#define CDAI_TYPE_RCAPLONG
#define XPORT_VERSION_UNSPECIFIED
#define PROTO_VERSION_UNKNOWN
#define CTS_SPI_VALID_SYNC_OFFSET
#define CDAI_TYPE_EXT_INQ
#define CTS_SPI_VALID_PPR_OPTIONS
#define CDAI_TYPE_SERIAL_NUM
#define CDAI_TYPE_PHYS_PATH
#define XPORT_VERSION_UNKNOWN
static __inline cam_status cam_ccb_status(union ccb *ccb)
#define CTS_FC_VALID_WWPN
static __inline uint8_t * scsiio_cdb_ptr(struct ccb_scsiio *ccb)
#define CTS_FC_VALID_SPEED
#define CDAI_TYPE_SCSI_DEVID
#define CAM_DEBUG(path, flag, printfargs)
void cam_periph_release_locked(struct cam_periph *periph)
void cam_freeze_devq(struct cam_path *path)
struct cam_periph * cam_periph_find(struct cam_path *path, char *name)
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)
int cam_periph_acquire(struct cam_periph *periph)
void cam_periph_doacquire(struct cam_periph *periph)
void cam_periph_freeze_after_event(struct cam_periph *periph, struct timeval *event_time, u_int duration_ms)
void cam_periph_invalidate(struct cam_periph *periph)
int cam_periph_error(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)
#define CAM_PERIPH_INVALID
#define cam_periph_assert(periph, what)
#define CAM_PERIPH_DRV_EARLY
void() periph_init_t(void)
void xpt_acquire_device(struct cam_ed *device)
struct mtx * xpt_path_mtx(struct cam_path *path)
void xpt_schedule(struct cam_periph *periph, u_int32_t new_priority)
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)
void xpt_release_device(struct cam_ed *device)
void xpt_print(struct cam_path *path, const char *fmt,...)
void xpt_release_path(struct cam_path *path)
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_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority)
void xpt_action(union ccb *start_ccb)
void xpt_done(union ccb *done_ccb)
union ccb * xpt_alloc_ccb_nowait(void)
void xpt_free_path(struct cam_path *path)
void xpt_action_default(union ccb *start_ccb)
cam_status xpt_compile_path(struct cam_path *new_path, struct cam_periph *perph, path_id_t path_id, target_id_t target_id, lun_id_t lun_id)
void xpt_stop_tags(struct cam_path *path)
void xpt_release_ccb(union ccb *free_ccb)
struct cam_ed * xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
target_id_t xpt_path_target_id(struct cam_path *path)
void xpt_release_devq(struct cam_path *path, u_int count, int run_queue)
void xpt_free_ccb(union ccb *free_ccb)
#define xpt_path_unlock(path)
#define xpt_path_owned(path)
#define xpt_path_lock(path)
#define xpt_path_assert(path, what)
static void xpt_path_inq(struct ccb_pathinq *cpi, struct cam_path *path)
#define CAM_DEV_UNCONFIGURED
#define CAM_DEV_INQUIRY_DATA_VALID
#define CAM_DEV_TAG_AFTER_COUNT
#define CAM_DEV_DV_HIT_BOTTOM
#define CAM_TAG_DELAY_COUNT
struct ccb_trans_settings_mmc * cts
void scsi_mode_sense(struct ccb_scsiio *csio, uint32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), uint8_t tag_action, int dbd, uint8_t pc, uint8_t page, uint8_t *param_buf, uint32_t param_len, uint8_t sense_len, uint32_t timeout)
char * scsi_cdb_string(u_int8_t *cdb_ptr, char *cdb_string, size_t len)
void scsi_print_inquiry(struct scsi_inquiry_data *inq_data)
int scsi_inquiry_match(caddr_t inqbuffer, caddr_t table_entry)
void scsi_print_inquiry_sbuf(struct sbuf *sb, struct scsi_inquiry_data *inq_data)
void scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t select_report, struct scsi_report_luns_data *rpl_buf, u_int32_t alloc_len, u_int8_t sense_len, u_int32_t timeout)
void scsi_inquiry(struct ccb_scsiio *csio, u_int32_t retries, void(*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t *inq_buf, u_int32_t inq_len, int evpd, u_int8_t page_code, u_int8_t sense_len, u_int32_t timeout)
const char * scsi_op_desc(u_int16_t opcode, struct scsi_inquiry_data *inq_data)
void scsi_print_inquiry_short_sbuf(struct sbuf *sb, struct scsi_inquiry_data *inq_data)
int scsi_vpd_supported_page(struct cam_periph *periph, uint8_t page_id)
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_print_inquiry_short(struct scsi_inquiry_data *inq_data)
u_int scsi_calc_syncsrate(u_int period_factor)
#define SVPD_SUPPORTED_PAGE_LIST
#define SVPD_EXTENDED_INQUIRY_DATA
#define SVPD_UNIT_SERIAL_NUMBER
#define RPL_REPORT_DEFAULT
#define SID_ADDITIONAL_LENGTH(iqd)
#define SVPD_SUPPORTED_PAGES_HDR_LEN
static __inline uint32_t scsi_2btoul(const uint8_t *bytes)
#define SIP_MEDIA_REMOVABLE
#define SHORT_INQUIRY_LENGTH
static __inline uint32_t scsi_4btoul(const uint8_t *bytes)
#define SID_QUAL_LU_CONNECTED
#define SMS_PAGE_CTRL_CURRENT
#define INQ_DATA_TQ_ENABLED(iqd)
#define SVPD_DEVICE_ID_MAX_SIZE
#define SMS_CONTROL_MODE_PAGE
#define SID_ANSI_REV(inq_data)
#define SID_QUAL_LU_OFFLINE
#define SID_QUAL(inq_data)
#define SVPD_DEVICE_ID_HDR_LEN
#define MSG_EXT_PPR_DT_REQ
#define MSG_EXT_WDTR_BUS_32_BIT
#define MSG_EXT_WDTR_BUS_16_BIT
#define MSG_EXT_WDTR_BUS_8_BIT
static const char west_digital[]
#define SCSI_XPT_XPORT(x, X)
static void scsi_dev_advinfo(union ccb *start_ccb)
#define CAM_GET_LUN(lp, i, lval)
static void scsi_announce_periph(struct cam_periph *periph)
static void _scsi_announce_periph(struct cam_periph *, u_int *, u_int *, struct ccb_trans_settings *)
#define CAM_QUIRK_NORPTLUNS
static void probedone(struct cam_periph *periph, union ccb *done_ccb)
static struct scsi_quirk_entry scsi_quirk_table[]
#define CAN_SRCH_HI_DENSE(dv)
static char * probe_action_text[]
static void scsi_find_quirk(struct cam_ed *device)
static void scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb)
@ PROBE_INQUIRY_BASIC_DV1
@ PROBE_SUPPORTED_VPD_LIST
@ PROBE_INQUIRY_BASIC_DV2
@ PROBE_TUR_FOR_NEGOTIATION
static void scsi_proto_debug_out(union ccb *ccb)
static int proberequestbackoff(struct cam_periph *periph, struct cam_ed *device)
static struct xpt_proto scsi_proto
static void scsi_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb)
SYSCTL_INT(_kern_cam, OID_AUTO, cam_srch_hi, CTLFLAG_RWTUN, &cam_srch_hi, 0, "Search above LUN 7 for SCSI3 and greater devices")
static cam_status proberegister(struct cam_periph *periph, void *arg)
static struct xpt_xport_ops scsi_xport_ops
PERIPHDRIVER_DECLARE(probe, probe_driver)
static void scsi_scan_bus(struct cam_periph *periph, union ccb *ccb)
CAM_XPT_PROTO(scsi_proto)
static void scsi_proto_announce(struct cam_ed *device)
static void scsi_set_transfer_settings(struct ccb_trans_settings *cts, struct cam_path *path, int async_update)
static const char microp[]
static void probestart(struct cam_periph *periph, union ccb *start_ccb)
#define CAM_QUIRK_NOHILUNS
static periph_init_t probe_periph_init
static struct periph_driver probe_driver
static struct xpt_proto_ops scsi_proto_ops
static void scsi_proto_denounce(struct cam_ed *device)
static void xptscandone(struct cam_periph *periph, union ccb *done_ccb)
static void scsi_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb)
static void scsi_dev_async(u_int32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg)
static void scsi_toggle_tags(struct cam_path *path)
static void probeschedule(struct cam_periph *probe_periph)
static const char seagate[]
static void proberequestdefaultnegotiation(struct cam_periph *periph)
#define CAN_SRCH_HI_SPARSE(dv)
static struct cam_ed * scsi_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
static void scsi_action(union ccb *start_ccb)
#define CCB_COMPLETED_OK(ccb)
#define CAM_CAN_GET_SIMPLE_LUN(x, i)
static void probe_purge_old(struct cam_path *path, struct scsi_report_luns_data *new, probe_flags flags)
static void probecleanup(struct cam_periph *periph)
static void scsi_devise_transport(struct cam_path *path)
static const char samsung[]
static const char quantum[]
static void scsi_scan_lun(struct cam_periph *periph, struct cam_path *path, cam_flags flags, union ccb *ccb)
#define PROBE_SET_ACTION(softc, newaction)
#define CAM_GET_SIMPLE_LUN(lp, i, lval)
struct timeval last_reset
u_int32_t tag_delay_count
uint8_t supported_vpds_len
struct scsi_inquiry_data inq_data
struct scsi_report_luns_data * luns
struct cam_periph * periph
void(* cbfcnp)(struct cam_periph *, union ccb *)
struct ccb_pathinq_settings_spi spi
union ccb_pathinq::@2 xport_specific
u_int32_t base_transfer_speed
struct ccb_trans_settings_spi spi
union ccb_trans_settings::@4 xport_specific
TAILQ_HEAD(, cam_periph) units
struct scsi_inquiry_pattern inq_pat
struct scsi_report_luns_lundata luns[0]
u_int8_t serial_num[SVPD_SERIAL_NUM_SIZE]
xpt_proto_announce_func announce
xpt_alloc_device_func alloc_device
struct ccb_trans_settings cts
struct ccb_dev_advinfo cdai