FreeBSD kernel CAM code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/systm.h>
#include <sys/types.h>
#include <sys/malloc.h>
#include <sys/kernel.h>
#include <sys/time.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/md5.h>
#include <sys/sbuf.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysctl.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
#include <cam/cam_queue.h>
#include <cam/cam_periph.h>
#include <cam/cam_sim.h>
#include <cam/cam_xpt.h>
#include <cam/cam_xpt_sim.h>
#include <cam/cam_xpt_periph.h>
#include <cam/cam_xpt_internal.h>
#include <cam/cam_debug.h>
#include <cam/scsi/scsi_all.h>
#include <cam/scsi/scsi_message.h>
#include <cam/scsi/scsi_pass.h>
#include <machine/stdarg.h>
#include "opt_cam.h"
Go to the source code of this file.
Data Structures | |
struct | scsi_quirk_entry |
struct | probe_softc |
struct | scsi_scan_bus_info |
Macros | |
#define | CAM_QUIRK_NOLUNS 0x01 |
#define | CAM_QUIRK_NOVPDS 0x02 |
#define | CAM_QUIRK_HILUNS 0x04 |
#define | CAM_QUIRK_NOHILUNS 0x08 |
#define | CAM_QUIRK_NORPTLUNS 0x10 |
#define | SCSI_QUIRK(dev) ((struct scsi_quirk_entry *)((dev)->quirk)) |
#define | CAM_SCSI2_MAXLUN 8 |
#define | CAM_CAN_GET_SIMPLE_LUN(x, i) |
#define | CAM_GET_SIMPLE_LUN(lp, i, lval) |
#define | CAM_GET_LUN(lp, i, lval) |
#define | CAN_SRCH_HI_SPARSE(dv) |
#define | CAN_SRCH_HI_DENSE(dv) |
#define | PROBE_SET_ACTION(softc, newaction) |
#define | SCSI_XPT_XPORT(x, X) |
#define | CCB_COMPLETED_OK(ccb) (((ccb).status & CAM_STATUS_MASK) == CAM_REQ_CMP) |
Enumerations | |
enum | probe_action { PROBE_RESET , PROBE_IDENTIFY , PROBE_POWER_OFF , PROBE_GET_HOST_OCR , PROBE_RESET_BUS , PROBE_SET_ID_FREQ , PROBE_SET_CS , PROBE_GO_IDLE_STATE , PROBE_SDIO_RESET , PROBE_SEND_IF_COND , PROBE_SDIO_INIT , PROBE_MMC_INIT , PROBE_SEND_APP_OP_COND , PROBE_GET_CID , PROBE_GET_CSD , PROBE_SEND_RELATIVE_ADDR , PROBE_MMC_SET_RELATIVE_ADDR , PROBE_SELECT_CARD , PROBE_DONE , PROBE_INVALID , PROBE_TUR , PROBE_INQUIRY , PROBE_FULL_INQUIRY , PROBE_REPORT_LUNS , PROBE_MODE_SENSE , PROBE_SUPPORTED_VPD_LIST , PROBE_DEVICE_ID , PROBE_EXTENDED_INQUIRY , PROBE_SERIAL_NUM , PROBE_TUR_FOR_NEGOTIATION , PROBE_INQUIRY_BASIC_DV1 , PROBE_INQUIRY_BASIC_DV2 , PROBE_DV_EXIT , PROBE_DONE , PROBE_INVALID } |
enum | probe_flags { PROBE_INQUIRY_CKSUM = 0x01 , PROBE_NO_ANNOUNCE = 0x04 , PROBE_EXTLUN = 0x08 } |
Functions | |
__FBSDID ("$FreeBSD$") | |
SYSCTL_INT (_kern_cam, OID_AUTO, cam_srch_hi, CTLFLAG_RWTUN, &cam_srch_hi, 0, "Search above LUN 7 for SCSI3 and greater devices") | |
PERIPHDRIVER_DECLARE (probe, probe_driver) | |
static cam_status | proberegister (struct cam_periph *periph, void *arg) |
static void | probeschedule (struct cam_periph *probe_periph) |
static void | probestart (struct cam_periph *periph, union ccb *start_ccb) |
static void | proberequestdefaultnegotiation (struct cam_periph *periph) |
static int | proberequestbackoff (struct cam_periph *periph, struct cam_ed *device) |
static void | probedone (struct cam_periph *periph, union ccb *done_ccb) |
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_find_quirk (struct cam_ed *device) |
static void | scsi_scan_bus (struct cam_periph *periph, union ccb *ccb) |
static void | scsi_scan_lun (struct cam_periph *periph, struct cam_path *path, cam_flags flags, union ccb *ccb) |
static void | xptscandone (struct cam_periph *periph, union ccb *done_ccb) |
static struct cam_ed * | scsi_alloc_device (struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) |
static void | scsi_devise_transport (struct cam_path *path) |
static void | scsi_set_transfer_settings (struct ccb_trans_settings *cts, struct cam_path *path, int async_update) |
static void | scsi_toggle_tags (struct cam_path *path) |
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_action (union ccb *start_ccb) |
static void | scsi_announce_periph (struct cam_periph *periph) |
static void | scsi_announce_periph_sbuf (struct cam_periph *periph, struct sbuf *sb) |
static void | scsi_proto_announce (struct cam_ed *device) |
static void | scsi_proto_announce_sbuf (struct cam_ed *device, struct sbuf *sb) |
static void | scsi_proto_denounce (struct cam_ed *device) |
static void | scsi_proto_denounce_sbuf (struct cam_ed *device, struct sbuf *sb) |
static void | scsi_proto_debug_out (union ccb *ccb) |
static void | _scsi_announce_periph (struct cam_periph *, u_int *, u_int *, struct ccb_trans_settings *) |
SCSI_XPT_XPORT (spi, SPI) | |
SCSI_XPT_XPORT (sas, SAS) | |
SCSI_XPT_XPORT (fc, FC) | |
SCSI_XPT_XPORT (usb, USB) | |
SCSI_XPT_XPORT (iscsi, ISCSI) | |
SCSI_XPT_XPORT (srp, SRP) | |
SCSI_XPT_XPORT (ppb, PPB) | |
CAM_XPT_PROTO (scsi_proto) | |
static void | scsi_dev_advinfo (union ccb *start_ccb) |
Variables | |
static int | cam_srch_hi = 0 |
static periph_init_t | probe_periph_init |
static struct periph_driver | probe_driver |
static char * | probe_action_text [] |
static const char | quantum [] = "QUANTUM" |
static const char | sony [] = "SONY" |
static const char | west_digital [] = "WDIGTL" |
static const char | samsung [] = "SAMSUNG" |
static const char | seagate [] = "SEAGATE" |
static const char | microp [] = "MICROP" |
static struct scsi_quirk_entry | scsi_quirk_table [] |
static struct xpt_xport_ops | scsi_xport_ops |
static struct xpt_proto_ops | scsi_proto_ops |
static struct xpt_proto | scsi_proto |
#define CAM_CAN_GET_SIMPLE_LUN | ( | x, | |
i | |||
) |
Definition at line 86 of file scsi_xpt.c.
#define CAM_GET_LUN | ( | lp, | |
i, | |||
lval | |||
) |
Definition at line 101 of file scsi_xpt.c.
#define CAM_GET_SIMPLE_LUN | ( | lp, | |
i, | |||
lval | |||
) |
Definition at line 91 of file scsi_xpt.c.
#define CAM_QUIRK_HILUNS 0x04 |
Definition at line 73 of file scsi_xpt.c.
#define CAM_QUIRK_NOHILUNS 0x08 |
Definition at line 74 of file scsi_xpt.c.
#define CAM_QUIRK_NOLUNS 0x01 |
Definition at line 71 of file scsi_xpt.c.
#define CAM_QUIRK_NORPTLUNS 0x10 |
Definition at line 75 of file scsi_xpt.c.
#define CAM_QUIRK_NOVPDS 0x02 |
Definition at line 72 of file scsi_xpt.c.
#define CAM_SCSI2_MAXLUN 8 |
Definition at line 85 of file scsi_xpt.c.
#define CAN_SRCH_HI_DENSE | ( | dv | ) |
Definition at line 117 of file scsi_xpt.c.
#define CAN_SRCH_HI_SPARSE | ( | dv | ) |
Definition at line 112 of file scsi_xpt.c.
#define CCB_COMPLETED_OK | ( | ccb | ) | (((ccb).status & CAM_STATUS_MASK) == CAM_REQ_CMP) |
Definition at line 1167 of file scsi_xpt.c.
#define PROBE_SET_ACTION | ( | softc, | |
newaction | |||
) |
Definition at line 169 of file scsi_xpt.c.
#define SCSI_QUIRK | ( | dev | ) | ((struct scsi_quirk_entry *)((dev)->quirk)) |
Definition at line 79 of file scsi_xpt.c.
#define SCSI_XPT_XPORT | ( | x, | |
X | |||
) |
Definition at line 614 of file scsi_xpt.c.
enum probe_action |
Definition at line 133 of file scsi_xpt.c.
enum probe_flags |
Enumerator | |
---|---|
PROBE_INQUIRY_CKSUM | |
PROBE_NO_ANNOUNCE | |
PROBE_EXTLUN |
Definition at line 179 of file scsi_xpt.c.
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 3044 of file scsi_xpt.c.
References ccb_pathinq::base_transfer_speed, ccb_trans_settings_fc::bitrate, ccb_trans_settings_sas::bitrate, ccb_trans_settings_spi::bus_width, cam_ccb_status(), cam_periph_assert, CAM_PRIORITY_NORMAL, CAM_REQ_CMP, ccb_pathinq::ccb_h, cts, CTS_FC_VALID_SPEED, CTS_SAS_VALID_SPEED, CTS_SPI_VALID_BUS_WIDTH, CTS_SPI_VALID_SYNC_OFFSET, CTS_TYPE_CURRENT_SETTINGS, ccb_hdr::func_code, cam_periph::path, cam_path::periph, scsi_calc_syncsrate(), ccb_trans_settings_spi::sync_offset, ccb_trans_settings_spi::sync_period, ccb_trans_settings_spi::valid, ccb_trans_settings_fc::valid, ccb_trans_settings_sas::valid, XPORT_FC, XPORT_SAS, XPORT_SPI, xpt_action(), XPT_GET_TRAN_SETTINGS, XPT_PATH_INQ, and xpt_setup_ccb().
Referenced by scsi_announce_periph(), and scsi_announce_periph_sbuf().
CAM_XPT_PROTO | ( | scsi_proto | ) |
PERIPHDRIVER_DECLARE | ( | probe | , |
probe_driver | |||
) |
|
static |
Definition at line 1828 of file scsi_xpt.c.
References AC_LOST_DEVICE, CAM_CAN_GET_SIMPLE_LUN, CAM_GET_LUN, CAM_GET_SIMPLE_LUN, CAM_REQ_CMP, scsi_report_luns_data::length, scsi_report_luns_lundata::lundata, cam_et::luns, scsi_report_luns_data::luns, cam_et::luns_mtx, PROBE_EXTLUN, scsi_4btoul(), cam_path::target, xpt_async(), xpt_create_path(), xpt_free_path(), xpt_path_path_id(), and xpt_path_target_id().
Referenced by probedone().
|
static |
Definition at line 1897 of file scsi_xpt.c.
References cam_periph::softc.
Referenced by scsi_scan_lun().
|
static |
Definition at line 1170 of file scsi_xpt.c.
References AC_FOUND_DEVICE, AC_LOST_DEVICE, scsi_mode_header_6::blk_desc_len, cam_ccb_status(), CAM_DEBUG, CAM_DEBUG_PROBE, CAM_DEBUG_TRACE, CAM_DEV_DV_HIT_BOTTOM, CAM_DEV_IN_DV, CAM_DEV_INQUIRY_DATA_VALID, CAM_DEV_QFRZN, CAM_DEV_UNCONFIGURED, CAM_GET_LUN, cam_periph_assert, cam_periph_error(), cam_periph_invalidate(), cam_periph_release_locked(), CAM_QUIRK_NORPTLUNS, cam_release_devq(), CAM_REQ_CMP, CCB_COMPLETED_OK, ccb_scsiio::ccb_h, ccb::ccb_h, ccb::csio, ccb_scsiio::data_ptr, cam_path::device, cam_ed::device_id, cam_ed::device_id_len, ccb_scsiio::dxfer_len, cam_ed::ext_inq, cam_ed::ext_inq_len, cam_ed::flags, scsi_inquiry_data::flags, scsi_vpd_extended_inquiry_data::flags1, ccb_hdr::func_code, cam_ed::inq_data, INQ_DATA_TQ_ENABLED, scsi_vpd_supported_page_list::length, scsi_vpd_unit_serial_number::length, scsi_vpd_device_id::length, scsi_report_luns_data::length, cam_ed::lun_id, scsi_report_luns_lundata::lundata, scsi_report_luns_data::luns, scsi_vpd_extended_inquiry_data::page_length, ccb_hdr::path, cam_periph::path, ccb_hdr::pinfo, cam_pinfo::priority, PROBE_DEVICE_ID, PROBE_DONE, PROBE_DV_EXIT, PROBE_EXTENDED_INQUIRY, PROBE_FULL_INQUIRY, PROBE_INQUIRY, PROBE_INQUIRY_BASIC_DV1, PROBE_INQUIRY_BASIC_DV2, PROBE_INQUIRY_CKSUM, PROBE_INVALID, PROBE_MODE_SENSE, PROBE_NO_ANNOUNCE, probe_purge_old(), PROBE_REPORT_LUNS, PROBE_SERIAL_NUM, PROBE_SET_ACTION, PROBE_SUPPORTED_VPD_LIST, PROBE_TUR, PROBE_TUR_FOR_NEGOTIATION, proberequestbackoff(), proberequestdefaultnegotiation(), probeschedule(), cam_ed::queue_flags, scsi_control_page::queue_flags, ccb_scsiio::resid, cam_et::rpl_size, scsi_2btoul(), scsi_4btoul(), scsi_devise_transport(), scsi_find_quirk(), SCSI_QUIRK, SCSI_REV_SPC2, cam_ed::serial_num, scsi_vpd_unit_serial_number::serial_num, cam_ed::serial_num_len, SF_NO_PRINT, SF_NO_RECOVERY, SF_NO_RETRY, SF_QUIET_IR, SF_RETRY_UA, SHORT_INQUIRY_LENGTH, SID_ADDITIONAL_LENGTH, SID_ANSI_REV, SID_QUAL, SID_QUAL_LU_CONNECTED, SID_QUAL_LU_OFFLINE, SID_Sync, cam_periph::softc, ccb_hdr::status, cam_ed::supported_vpds, cam_ed::supported_vpds_len, SVPD_DEVICE_ID_HDR_LEN, SVPD_SUPPORTED_PAGES_HDR_LEN, cam_path::target, ccb_hdr::target_lun, xpt_acquire_device(), xpt_action(), xpt_async(), xpt_done(), XPT_GDEV_TYPE, xpt_print(), xpt_release_ccb(), xpt_release_devq(), and xpt_schedule().
Referenced by probestart().
|
static |
Definition at line 652 of file scsi_xpt.c.
References cam_path::bus, CAM_DEBUG, CAM_DEBUG_PROBE, cam_periph_acquire(), cam_periph_freeze_after_event(), CAM_REQ_CMP, CAM_REQ_CMP_ERR, ccb::ccb_h, cam_eb::last_reset, cam_periph::path, PROBE_INVALID, probeschedule(), scsi_delay, scsi_devise_transport(), and cam_periph::softc.
Referenced by scsi_scan_lun().
|
static |
Definition at line 1067 of file scsi_xpt.c.
References cam_ccb_status(), CAM_DEBUG, CAM_DEBUG_PROBE, CAM_DEV_DV_HIT_BOTTOM, CAM_PRIORITY_NONE, CAM_REQ_CMP, cts, CTS_SPI_VALID_SYNC_OFFSET, CTS_SPI_VALID_SYNC_RATE, CTS_TYPE_CURRENT_SETTINGS, cam_ed::flags, cam_periph::path, ccb_trans_settings_spi::sync_offset, ccb_trans_settings_spi::sync_period, ccb_trans_settings_spi::valid, XPORT_SPI, xpt_action(), XPT_GET_TRAN_SETTINGS, xpt_print(), XPT_SET_TRAN_SETTINGS, and xpt_setup_ccb().
Referenced by probedone().
|
static |
Definition at line 1046 of file scsi_xpt.c.
References cam_ccb_status(), CAM_PRIORITY_NONE, CAM_REQ_CMP, cts, CTS_TYPE_CURRENT_SETTINGS, CTS_TYPE_USER_SETTINGS, cam_periph::path, xpt_action(), XPT_GET_TRAN_SETTINGS, XPT_SET_TRAN_SETTINGS, and xpt_setup_ccb().
Referenced by probedone(), and probeschedule().
|
static |
Definition at line 696 of file scsi_xpt.c.
References CAM_DEV_UNCONFIGURED, CAM_EXPECT_INQ_CHANGE, CAM_PRIORITY_XPT, ccb, ccb::ccb_h, ccb::cpi, ccb::crcn, cam_path::device, ccb_rescan::flags, cam_ed::flags, ccb_pathinq::hba_inquiry, ccb_pathinq::hba_misc, ccb_hdr::path, cam_periph::path, PI_SDTR_ABLE, PI_WIDE_16, PI_WIDE_32, PIM_EXTLUNS, PIM_NOBUSRESET, PROBE_EXTLUN, PROBE_INQUIRY, PROBE_NO_ANNOUNCE, PROBE_SET_ACTION, PROBE_TUR, proberequestdefaultnegotiation(), cam_periph::softc, ccb_hdr::target_lun, xpt_path_inq(), and xpt_schedule().
Referenced by probedone(), and proberegister().
|
static |
Definition at line 750 of file scsi_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, CAM_DEV_QFREEZE, CAM_DEV_UNCONFIGURED, cam_freeze_devq(), cam_periph_doacquire(), CAM_QUIRK_NOVPDS, ccb::ccb_h, ccb::csio, ccb_scsiio::data_ptr, cam_path::device, ccb_hdr::flags, cam_ed::flags, cam_ed::inq_data, INQ_DATA_TQ_ENABLED, MSG_SIMPLE_Q_TAG, ccb_hdr::path, cam_periph::path, PROBE_DEVICE_ID, PROBE_DV_EXIT, PROBE_EXTENDED_INQUIRY, PROBE_FULL_INQUIRY, PROBE_INQUIRY, PROBE_INQUIRY_BASIC_DV1, PROBE_INQUIRY_BASIC_DV2, PROBE_INQUIRY_CKSUM, PROBE_MODE_SENSE, PROBE_REPORT_LUNS, PROBE_SERIAL_NUM, PROBE_SET_ACTION, PROBE_SUPPORTED_VPD_LIST, PROBE_TUR, PROBE_TUR_FOR_NEGOTIATION, probedone(), RPL_REPORT_DEFAULT, cam_et::rpl_size, scsi_inquiry(), scsi_mode_sense(), SCSI_QUIRK, scsi_report_luns(), scsi_test_unit_ready(), scsi_vpd_supported_page(), cam_ed::serial_num, cam_ed::serial_num_len, SHORT_INQUIRY_LENGTH, SID_ADDITIONAL_LENGTH, SMS_CONTROL_MODE_PAGE, SMS_PAGE_CTRL_CURRENT, cam_periph::softc, SSD_FULL_SIZE, SSD_MIN_SIZE, SVPD_DEVICE_ID, SVPD_DEVICE_ID_MAX_SIZE, SVPD_EXTENDED_INQUIRY_DATA, SVPD_SUPPORTED_PAGE_LIST, SVPD_UNIT_SERIAL_NUMBER, cam_path::target, xpt_action(), and xpt_print().
Referenced by scsi_scan_lun().
|
static |
Definition at line 2627 of file scsi_xpt.c.
References ccb_hdr::alloc_flags, CAM_CCB_FROM_UMA, ccb::ccb_h, ccb::crcn, ccb::cts, ccb_rescan::flags, ccb_hdr::func_code, ccb_hdr::path, cam_path::periph, scsi_dev_advinfo(), scsi_scan_bus(), scsi_scan_lun(), scsi_set_transfer_settings(), xpt_action_default(), XPT_DEV_ADVINFO, XPT_SCAN_BUS, XPT_SCAN_LUN, XPT_SCAN_TGT, XPT_SCSI_IO, and XPT_SET_TRAN_SETTINGS.
|
static |
Definition at line 2398 of file scsi_xpt.c.
References cam_ed::device_id, cam_ed::device_id_len, cam_ed::inq_data, cam_ed::inq_flags, cam_ed::lun_id, cam_ed::maxtags, cam_ed::mintags, cam_ed::queue_flags, cam_ed::quirk, scsi_quirk_table, cam_ed::serial_num, cam_ed::serial_num_len, cam_ed::supported_vpds, cam_ed::supported_vpds_len, cam_ed::target, and xpt_alloc_device().
|
static |
Definition at line 3154 of file scsi_xpt.c.
References _scsi_announce_periph(), ccb_trans_settings_spi::bus_width, cam_ccb_status(), CAM_REQ_CMP, cts, CTS_FC_VALID_PORT, CTS_FC_VALID_WWNN, CTS_FC_VALID_WWPN, CTS_SPI_VALID_BUS_WIDTH, MSG_EXT_PPR_DT_REQ, cam_periph::periph_name, ccb_trans_settings_fc::port, ccb_trans_settings_spi::ppr_options, ccb_trans_settings_spi::sync_offset, cam_periph::unit_number, ccb_trans_settings_spi::valid, ccb_trans_settings_fc::valid, ccb_trans_settings_fc::wwnn, ccb_trans_settings_fc::wwpn, XPORT_FC, and XPORT_SPI.
|
static |
Definition at line 3097 of file scsi_xpt.c.
References _scsi_announce_periph(), ccb_trans_settings_spi::bus_width, cam_ccb_status(), CAM_REQ_CMP, cts, CTS_FC_VALID_PORT, CTS_FC_VALID_WWNN, CTS_FC_VALID_WWPN, CTS_SPI_VALID_BUS_WIDTH, MSG_EXT_PPR_DT_REQ, cam_periph::periph_name, ccb_trans_settings_fc::port, ccb_trans_settings_spi::ppr_options, ccb_trans_settings_spi::sync_offset, cam_periph::unit_number, ccb_trans_settings_spi::valid, ccb_trans_settings_fc::valid, ccb_trans_settings_fc::wwnn, ccb_trans_settings_fc::wwpn, XPORT_FC, and XPORT_SPI.
|
static |
Definition at line 2510 of file scsi_xpt.c.
References AC_ADVINFO_CHANGED, ccb_dev_advinfo::buf, ccb_dev_advinfo::bufsiz, ccb_dev_advinfo::buftype, CAM_REQ_ABORTED, CAM_REQ_CMP, CAM_REQ_INVALID, ccb::ccb_h, ccb::cdai, CDAI_FLAG_STORE, CDAI_TYPE_EXT_INQ, CDAI_TYPE_PHYS_PATH, CDAI_TYPE_RCAPLONG, CDAI_TYPE_SCSI_DEVID, CDAI_TYPE_SERIAL_NUM, cam_path::device, cam_ed::device_id, cam_ed::device_id_len, cam_ed::ext_inq, cam_ed::ext_inq_len, ccb_dev_advinfo::flags, ccb_hdr::path, cam_ed::physpath, cam_ed::physpath_len, ccb_dev_advinfo::provsiz, cam_ed::rcap_buf, cam_ed::rcap_len, cam_ed::serial_num, cam_ed::serial_num_len, ccb_hdr::status, xpt_async(), and xpt_path_assert.
Referenced by scsi_action().
|
static |
Definition at line 2971 of file scsi_xpt.c.
References AC_BUS_RESET, AC_INQ_CHANGED, AC_LOST_DEVICE, AC_SENT_BDR, AC_TRANSFER_NEG, cam_path::bus, CAM_DEV_UNCONFIGURED, CAM_EXPECT_INQ_CHANGE, cam_freeze_devq(), CAM_LUN_WILDCARD, cam_release_devq(), CAM_REQ_CMP, CAM_REQ_CMP_ERR, CAM_TARGET_WILDCARD, cam_path::device, cam_ed::flags, cam_ed::lun_id, cam_eb::path_id, cam_path::periph, RELSIM_RELEASE_AFTER_TIMEOUT, scsi_delay, scsi_scan_lun(), scsi_set_transfer_settings(), scsi_toggle_tags(), cam_path::target, cam_et::target_id, xpt_compile_path(), xpt_release_device(), and xpt_release_path().
|
static |
Definition at line 2428 of file scsi_xpt.c.
References CAM_DEV_INQUIRY_DATA_VALID, CAM_PRIORITY_NONE, ccb_pathinq::ccb_h, cts, CTS_TYPE_CURRENT_SETTINGS, cam_path::device, cam_ed::flags, ccb_hdr::func_code, cam_ed::inq_data, PROTO_SCSI, cam_ed::protocol, ccb_pathinq::protocol_version, cam_ed::protocol_version, SID_ANSI_REV, SID_SPI_MASK, scsi_inquiry_data::spi3data, cam_path::target, ccb_pathinq::transport, cam_ed::transport, ccb_pathinq::transport_version, cam_ed::transport_version, XPORT_SPI, xpt_action(), XPT_PATH_INQ, XPT_SET_TRAN_SETTINGS, and xpt_setup_ccb().
Referenced by probedone(), and proberegister().
|
static |
Definition at line 1903 of file scsi_xpt.c.
References cam_quirkmatch(), cam_ed::inq_data, cam_ed::maxtags, scsi_quirk_entry::maxtags, cam_ed::mintags, scsi_quirk_entry::mintags, cam_ed::quirk, scsi_inquiry_match(), and scsi_quirk_table.
Referenced by probedone().
|
static |
Definition at line 3217 of file scsi_xpt.c.
References cam_ed::inq_data, and scsi_print_inquiry().
|
static |
Definition at line 3211 of file scsi_xpt.c.
References cam_ed::inq_data, and scsi_print_inquiry_sbuf().
|
static |
Definition at line 3235 of file scsi_xpt.c.
References CAM_DEBUG, CAM_DEBUG_CDB, ccb::ccb_h, ccb::csio, cam_path::device, ccb_hdr::func_code, cam_ed::inq_data, ccb_hdr::path, scsi_cdb_string(), SCSI_MAX_CDBLEN, scsi_op_desc(), scsiio_cdb_ptr(), and XPT_SCSI_IO.
|
static |
Definition at line 3229 of file scsi_xpt.c.
References cam_ed::inq_data, and scsi_print_inquiry_short().
|
static |
Definition at line 3223 of file scsi_xpt.c.
References cam_ed::inq_data, and scsi_print_inquiry_short_sbuf().
|
static |
Definition at line 1935 of file scsi_xpt.c.
References cam_et::bus, cam_path::bus, CAM_CAN_GET_SIMPLE_LUN, cam_ccb_status(), CAM_DEBUG, CAM_DEBUG_PROBE, CAM_DEBUG_TRACE, CAM_DEV_INQUIRY_DATA_VALID, CAM_DEV_UNCONFIGURED, CAM_GET_LUN, CAM_GET_SIMPLE_LUN, CAM_PRIORITY_NONE, CAM_QUIRK_NOLUNS, CAM_REQ_CMP, CAM_RESRC_UNAVAIL, CAM_SCSI2_MAXLUN, CAM_UNLOCKED, CAN_SRCH_HI_DENSE, CAN_SRCH_HI_SPARSE, ccb_hdr::cbfcnp, ccb::ccb_h, scsi_scan_bus_info::counter, ccb::cpi, scsi_scan_bus_info::cpi, ccb::crcn, cam_path::device, cam_eb::eb_mtx, ccb_hdr::flags, ccb_rescan::flags, cam_ed::flags, ccb_hdr::func_code, ccb_pathinq::hba_inquiry, ccb_pathinq::hba_misc, ccb_pathinq::initiator_id, cam_eb::last_reset, scsi_report_luns_data::length, cam_ed::lun_id, scsi_scan_bus_info::lunindex, cam_et::luns, cam_et::luns_mtx, ccb_pathinq::max_lun, ccb_pathinq::max_target, ccb_hdr::path, ccb_hdr::path_id, PI_SDTR_ABLE, PI_WIDE_16, PI_WIDE_32, PIM_EXTLUNS, PIM_NOBUSRESET, PIM_NOINITIATOR, PIM_SEQSCAN, ccb_hdr::pinfo, cam_pinfo::priority, scsi_scan_bus_info::request_ccb, scsi_4btoul(), SCSI_QUIRK, scsi_scan_bus(), ccb_hdr::status, cam_ed::target, cam_path::target, ccb_hdr::target_id, ccb_hdr::target_lun, xpt_action(), xpt_alloc_ccb_nowait(), xpt_create_path(), xpt_done(), xpt_free_ccb(), xpt_free_path(), XPT_PATH_INQ, xpt_path_mtx(), XPT_RESET_BUS, XPT_SCAN_BUS, XPT_SCAN_LUN, XPT_SCAN_TGT, and xpt_setup_ccb().
Referenced by scsi_action(), and scsi_scan_bus().
|
static |
Definition at line 2297 of file scsi_xpt.c.
References cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, cam_periph_alloc(), CAM_PERIPH_BIO, cam_periph_find(), CAM_PERIPH_INVALID, CAM_PRIORITY_NONE, CAM_PRIORITY_XPT, CAM_REQ_CMP, CAM_REQ_CMP_ERR, CAM_UNLOCKED, ccb_hdr::cbfcnp, ccb_pathinq::ccb_h, ccb::ccb_h, ccb::crcn, cam_path::device, ccb_hdr::flags, ccb_rescan::flags, cam_periph::flags, ccb_hdr::func_code, ccb_pathinq::hba_misc, cam_ed::lun_id, ccb_hdr::path, cam_periph::path, cam_eb::path_id, PIM_NOINITIATOR, probecleanup(), proberegister(), probestart(), cam_periph::softc, ccb_hdr::status, cam_path::target, cam_et::target_id, xpt_action(), xpt_alloc_ccb_nowait(), xpt_create_path(), xpt_done(), xpt_free_ccb(), XPT_PATH_INQ, xpt_path_lock, xpt_path_owned, xpt_path_unlock, xpt_print(), XPT_SCAN_LUN, xpt_setup_ccb(), and xptscandone().
Referenced by scsi_action(), and scsi_dev_async().
|
static |
Definition at line 2666 of file scsi_xpt.c.
References ccb_trans_settings_spi::bus_width, cam_ccb_status(), CAM_DEV_INQUIRY_DATA_VALID, CAM_DEV_TAG_AFTER_COUNT, CAM_PATH_INVALID, CAM_PRIORITY_NONE, CAM_REQ_CMP, CAM_TAG_DELAY_COUNT, ccb_pathinq::ccb_h, ccb_trans_settings::ccb_h, cts, CTS_SCSI_FLAGS_TAG_ENB, CTS_SCSI_VALID_TQ, CTS_SPI_FLAGS_DISC_ENB, CTS_SPI_VALID_BUS_WIDTH, CTS_SPI_VALID_DISC, CTS_SPI_VALID_PPR_OPTIONS, CTS_SPI_VALID_SYNC_OFFSET, CTS_SPI_VALID_SYNC_RATE, CTS_TYPE_CURRENT_SETTINGS, CTS_TYPE_USER_SETTINGS, cam_path::device, ccb_trans_settings_scsi::flags, ccb_trans_settings_spi::flags, cam_ed::flags, scsi_inquiry_data::flags, ccb_hdr::func_code, ccb_pathinq::hba_inquiry, cam_ed::inq_data, INQ_DATA_TQ_ENABLED, cam_ed::inq_flags, cam_ed::mintags, MSG_EXT_WDTR_BUS_16_BIT, MSG_EXT_WDTR_BUS_32_BIT, MSG_EXT_WDTR_BUS_8_BIT, PI_SDTR_ABLE, PI_TAG_ABLE, PI_WIDE_16, PI_WIDE_32, ccb_pathinq_settings_spi::ppr_options, ccb_trans_settings_spi::ppr_options, PROTO_SCSI, PROTO_UNKNOWN, PROTO_UNSPECIFIED, PROTO_VERSION_UNKNOWN, PROTO_VERSION_UNSPECIFIED, cam_ed::protocol, cam_ed::protocol_version, cam_ed::queue_flags, SCP_QUEUE_DQUE, scsi_toggle_tags(), SID_CmdQue, SID_SPI_CLOCK_DT, SID_SPI_IUS, SID_SPI_QAS, SID_Sync, SID_WBus16, SID_WBus32, ccb_pathinq::spi, ccb_trans_settings::spi, scsi_inquiry_data::spi3data, ccb_trans_settings_spi::sync_offset, ccb_trans_settings_spi::sync_period, cam_ed::tag_delay_count, cam_ed::transport, cam_ed::transport_version, ccb_trans_settings::type, ccb_trans_settings_scsi::valid, ccb_trans_settings_spi::valid, ccb_pathinq::xport_specific, ccb_trans_settings::xport_specific, XPORT_SPI, XPORT_UNKNOWN, XPORT_UNSPECIFIED, XPORT_VERSION_UNKNOWN, XPORT_VERSION_UNSPECIFIED, xpt_action(), xpt_action_default(), xpt_done(), XPT_GET_TRAN_SETTINGS, XPT_PATH_INQ, xpt_print(), xpt_setup_ccb(), and xpt_stop_tags().
Referenced by scsi_action(), scsi_dev_async(), and scsi_toggle_tags().
|
static |
Definition at line 2934 of file scsi_xpt.c.
References CAM_DEV_TAG_AFTER_COUNT, CAM_PRIORITY_NONE, cts, CTS_SCSI_FLAGS_TAG_ENB, CTS_SCSI_VALID_TQ, cam_path::device, cam_ed::flags, cam_ed::inq_flags, PROTO_SCSI, PROTO_VERSION_UNSPECIFIED, scsi_set_transfer_settings(), SID_CmdQue, SID_Sync, SID_WBus16, SID_WBus32, XPORT_UNSPECIFIED, XPORT_VERSION_UNSPECIFIED, and xpt_setup_ccb().
Referenced by scsi_dev_async(), and scsi_set_transfer_settings().
SCSI_XPT_XPORT | ( | fc | , |
FC | |||
) |
SCSI_XPT_XPORT | ( | iscsi | , |
ISCSI | |||
) |
SCSI_XPT_XPORT | ( | ppb | , |
PPB | |||
) |
SCSI_XPT_XPORT | ( | sas | , |
SAS | |||
) |
SCSI_XPT_XPORT | ( | spi | , |
SPI | |||
) |
SCSI_XPT_XPORT | ( | srp | , |
SRP | |||
) |
SCSI_XPT_XPORT | ( | usb | , |
USB | |||
) |
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 |
Definition at line 2390 of file scsi_xpt.c.
References ccb::ccb_h, ccb_hdr::path, xpt_free_ccb(), and xpt_free_path().
Referenced by scsi_scan_lun().
|
static |
Definition at line 81 of file scsi_xpt.c.
|
static |
Definition at line 199 of file scsi_xpt.c.
|
static |
Definition at line 151 of file scsi_xpt.c.
|
static |
Definition at line 124 of file scsi_xpt.c.
|
static |
Definition at line 122 of file scsi_xpt.c.
|
static |
Definition at line 194 of file scsi_xpt.c.
|
static |
Definition at line 197 of file scsi_xpt.c.
|
static |
Definition at line 639 of file scsi_xpt.c.
|
static |
Definition at line 632 of file scsi_xpt.c.
|
static |
Definition at line 201 of file scsi_xpt.c.
Referenced by scsi_alloc_device(), and scsi_find_quirk().
|
static |
Definition at line 607 of file scsi_xpt.c.
|
static |
Definition at line 198 of file scsi_xpt.c.
|
static |
Definition at line 195 of file scsi_xpt.c.
|
static |
Definition at line 196 of file scsi_xpt.c.