FreeBSD kernel CAM code
|
Go to the source code of this file.
Data Structures | |
struct | async_node |
Macros | |
#define | xpt_path_lock(path) mtx_lock(xpt_path_mtx(path)) |
#define | xpt_path_unlock(path) mtx_unlock(xpt_path_mtx(path)) |
#define | xpt_path_assert(path, what) mtx_assert(xpt_path_mtx(path), (what)) |
#define | xpt_path_owned(path) mtx_owned(xpt_path_mtx(path)) |
#define | xpt_path_sleep(path, chan, priority, wmesg, timo) msleep((chan), xpt_path_mtx(path), (priority), (wmesg), (timo)) |
Functions | |
SLIST_HEAD (async_list, async_node) | |
SLIST_HEAD (periph_list, cam_periph) | |
void | xpt_action (union ccb *new_ccb) |
void | xpt_action_default (union ccb *new_ccb) |
union ccb * | xpt_alloc_ccb (void) |
union ccb * | xpt_alloc_ccb_nowait (void) |
void | xpt_free_ccb (union ccb *free_ccb) |
void | xpt_setup_ccb_flags (struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority, u_int32_t flags) |
void | xpt_setup_ccb (struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority) |
void | xpt_merge_ccb (union ccb *dst_ccb, union ccb *src_ccb) |
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) |
cam_status | xpt_create_path_unlocked (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) |
int | xpt_getattr (char *buf, size_t len, const char *attr, struct cam_path *path) |
void | xpt_free_path (struct cam_path *path) |
void | xpt_path_counts (struct cam_path *path, uint32_t *bus_ref, uint32_t *periph_ref, uint32_t *target_ref, uint32_t *device_ref) |
int | xpt_path_comp (struct cam_path *path1, struct cam_path *path2) |
int | xpt_path_comp_dev (struct cam_path *path, struct cam_ed *dev) |
int | xpt_path_string (struct cam_path *path, char *str, size_t str_len) |
int | xpt_path_sbuf (struct cam_path *path, struct sbuf *sb) |
path_id_t | xpt_path_path_id (struct cam_path *path) |
target_id_t | xpt_path_target_id (struct cam_path *path) |
lun_id_t | xpt_path_lun_id (struct cam_path *path) |
struct cam_sim * | xpt_path_sim (struct cam_path *path) |
struct cam_periph * | xpt_path_periph (struct cam_path *path) |
device_t | xpt_path_sim_device (const struct cam_path *path) |
Return the device_t associated with the path. More... | |
void | xpt_print_path (struct cam_path *path) |
void | xpt_print_device (struct cam_ed *device) |
void | xpt_print (struct cam_path *path, const char *fmt,...) |
void | xpt_async (u_int32_t async_code, struct cam_path *path, void *async_arg) |
void | xpt_rescan (union ccb *ccb) |
void | xpt_hold_boot (void) |
void | xpt_release_boot (void) |
void | xpt_lock_buses (void) |
void | xpt_unlock_buses (void) |
struct mtx * | xpt_path_mtx (struct cam_path *path) |
cam_status | xpt_register_async (int event, ac_callback_t *cbfunc, void *cbarg, struct cam_path *path) |
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) |
int | xpt_clone_path (struct cam_path **new_path, struct cam_path *path) |
void | xpt_release_path (struct cam_path *path) |
const char * | xpt_action_name (uint32_t action) |
void | xpt_pollwait (union ccb *start_ccb, uint32_t timeout) |
uint32_t | xpt_poll_setup (union ccb *start_ccb) |
void | xpt_sim_poll (struct cam_sim *sim) |
static void | xpt_path_inq (struct ccb_pathinq *cpi, struct cam_path *path) |
#define xpt_path_assert | ( | path, | |
what | |||
) | mtx_assert(xpt_path_mtx(path), (what)) |
#define xpt_path_lock | ( | path | ) | mtx_lock(xpt_path_mtx(path)) |
#define xpt_path_owned | ( | path | ) | mtx_owned(xpt_path_mtx(path)) |
#define xpt_path_sleep | ( | path, | |
chan, | |||
priority, | |||
wmesg, | |||
timo | |||
) | msleep((chan), xpt_path_mtx(path), (priority), (wmesg), (timo)) |
#define xpt_path_unlock | ( | path | ) | mtx_unlock(xpt_path_mtx(path)) |
SLIST_HEAD | ( | async_list | , |
async_node | |||
) |
SLIST_HEAD | ( | periph_list | , |
cam_periph | |||
) |
void xpt_action | ( | union ccb * | new_ccb | ) |
Definition at line 2601 of file cam_xpt.c.
References xpt_xport_ops::action, cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_REQ_INPROG, ccb::ccb_h, ccb_hdr::func_code, xpt_xport::ops, ccb_hdr::path, ccb_hdr::status, cam_eb::xport, and xpt_action_name().
Referenced by _ata_announce_periph(), _scsi_announce_periph(), abort_all_pending(), adaasync(), adastart(), aprobedone(), aproberequestdefaultnegotiation(), aprobestart(), ata_device_transport(), ata_scan_bus(), cam_freeze_devq(), cam_periph_bus_settle(), cam_periph_devctl_notify(), cam_periph_error(), cam_periph_ioctl(), cam_periph_runccb(), cam_release_devq(), camperiphdone(), camperiphfree(), camperiphscsisenseerror(), camperiphscsistatuserror(), cd6byteworkaround(), cddone(), cdstart(), chdone(), chscsiversion(), chstart(), cmd6workaround(), ctlfe_done(), ctlfe_dump_queue(), ctlfe_onoffline(), ctlfe_requeue_ccb(), ctlfedone(), ctlfeoninvalidate(), ctlferegister(), ctlfestart(), dadone_proberc(), dasetgeom(), dastart(), dasysctlinit(), mmc_announce_periph(), mmc_set_timing(), mmcprobe_done(), mmcprobe_start(), ndastart(), nvme_announce_periph(), nvme_device_transport(), nvme_probe_done(), nvme_probe_start(), passdoioctl(), passstart(), pmpdone(), pmpstart(), probedone(), proberequestbackoff(), proberequestdefaultnegotiation(), probestart(), ptstart(), saextget(), saregister(), sastart(), scsi_command_string(), scsi_devise_transport(), scsi_scan_bus(), scsi_scan_lun(), scsi_sense_sbuf(), scsi_set_transfer_settings(), sdda_add_part(), sdda_get_host_caps(), sdda_get_max_data(), sdda_init_switch_part(), sdda_set_bus_width(), sdda_start_init(), sddaasync(), sddastart(), ses_path_iter_devid_callback(), ses_paths_iter(), ses_set_physpath(), ses_setphyspath_callback(), sgsendrdwr(), targbhdislun(), targbhdone(), targbhenlun(), targbhstart(), targendislun(), targioctl(), targsendccb(), targwrite(), xpt_async(), xpt_getattr(), xpt_path_inq(), xpt_register_async(), xpt_scanner_thread(), xpt_start_tags(), xpt_stop_tags(), xptdoioctl(), and xptsetasyncfunc().
void xpt_action_default | ( | union ccb * | new_ccb | ) |
Definition at line 2613 of file cam_xpt.c.
References ccb_abort::abort_ccb, AC_INQ_CHANGED, ccb_getdevstats::allocated, cam_ccbq::allocated, cam_ed::asyncs, ccb::ataio, ccb_calc_geometry::block_size, cam_path::bus, ccb::cab, ccb_setasync::callback, async_node::callback, ccb_setasync::callback_arg, async_node::callback_arg, cam_ed::callout, cam_async, CAM_ASYNC_INDEX, cam_ccbq_insert_ccb(), cam_ccbq_pending_ccb_count(), cam_ccbq_remove_ccb(), CAM_CDB_POINTER, CAM_DEBUG, CAM_DEBUG_COMPILE, CAM_DEBUG_NONE, CAM_DEBUG_TRACE, CAM_DEV_MATCH_ERROR, CAM_DEV_NOT_THERE, CAM_DEV_POS_EDT, CAM_DEV_POS_NONE, CAM_DEV_POS_PDRV, CAM_DEV_POS_TYPEMASK, CAM_DEV_QFREEZE, CAM_DEV_QFRZN, CAM_DEV_REL_ON_COMPLETE, CAM_DEV_REL_ON_QUEUE_EMPTY, CAM_DEV_REL_TIMEOUT_PENDING, CAM_DEV_UNCONFIGURED, cam_dflags, CAM_DONEQ_INDEX, cam_doneq::cam_doneq_mtx, cam_dpath, CAM_FUNC_NOTAVAIL, CAM_GDEVLIST_ERROR, CAM_GDEVLIST_LAST_DEVICE, CAM_GDEVLIST_LIST_CHANGED, CAM_GDEVLIST_MORE_DEVS, CAM_PROVIDE_FAIL, CAM_REQ_ABORTED, CAM_REQ_CMP, CAM_REQ_CMP_ERR, CAM_RESRC_UNAVAIL, CAM_SIM_QUEUED, CAM_UA_ABORT, CAM_UNQUEUED_INDEX, ccb_getdev::ccb_h, ccb_getdevstats::ccb_h, ccb_getdevlist::ccb_h, ccb_relsim::ccb_h, ccb_setasync::ccb_h, ccb::ccb_h, cam_ed::ccbq, ccb::ccg, cdb_t::cdb_bytes, ccb_scsiio::cdb_io, ccb::cdbg, ccb::cdm, ccb::cgd, ccb::cgdl, ccb::cgds, ccb::cpis, ccb::crs, ccb::csa, ccb::csio, ccb_calc_geometry::cylinders, ccb_getdevstats::dev_active, cam_ccbq::dev_active, DEV_MATCH_BUS, DEV_MATCH_DEVICE, ccb_getdevstats::dev_openings, cam_ccbq::dev_openings, cam_path::device, cam_sim::devq, ccb_setasync::event_enable, async_node::event_enable, async_node::event_lock, ccb_hdr::flags, ccb_debug::flags, cam_ed::flags, ccb_hdr::func_code, ccb_getdevlist::generation, cam_ed::generation, ccb_calc_geometry::heads, ccb_getdevstats::held, ccb_getdev::ident_data, cam_ed::ident_data, cam_pinfo::index, ccb_getdevlist::index, ccb_getdev::inq_data, cam_ed::inq_data, ccb_getdev::inq_flags, cam_ed::inq_flags, ccb_getdevstats::last_reset, ccb_pathstats::last_reset, cam_et::last_reset, cam_eb::last_reset, ccb_getdevstats::maxtags, cam_ed::maxtags, ccb_getdevstats::mintags, cam_ed::mintags, cam_sim::mtx, ccb_dev_match::num_patterns, ccb_relsim::openings, ccb_hdr::path, ccb_hdr::path_id, ccb_dev_match::patterns, ccb_getdevlist::periph_name, cam_periph::periph_name, cam_ed::periphs, ccb_hdr::pinfo, ccb_dev_match::pos, ccb_dev_position::position_type, ccb_getdev::protocol, cam_ed::protocol, cam_ed::protocol_version, ccb_relsim::qfrozen_cnt, camq::qfrozen_cnt, cam_ccbq::queue, ccb_getdevstats::queued, ccb_relsim::release_flags, ccb_relsim::release_timeout, RELSIM_ADJUST_OPENINGS, RELSIM_RELEASE_AFTER_CMDCMPLT, RELSIM_RELEASE_AFTER_QEMPTY, RELSIM_RELEASE_AFTER_TIMEOUT, ccb_scsiio::resid, ccb_ataio::resid, SCSI_REV_2, ccb_scsiio::scsi_status, SCSI_STATUS_OK, ccb_calc_geometry::secs_per_track, cam_devq::send_mtx, ccb_scsiio::sense_resid, ccb_getdev::serial_num, cam_ed::serial_num, ccb_getdev::serial_num_len, cam_ed::serial_num_len, cam_ed::sim, cam_eb::sim, cam_sim::sim_action, ccb_hdr::status, ccb_getdevlist::status, ccb_dev_match::status, cam_path::target, ccb_hdr::target_id, ccb_hdr::target_lun, dev_match_pattern::type, ccb_getdevlist::unit_number, cam_periph::unit_number, ccb_calc_geometry::volume_size, XPT_ABORT, XPT_ACCEPT_TARGET_IO, xpt_acquire_device(), xpt_action_name(), XPT_ASYNC, xpt_async(), XPT_ATA_IO, XPT_CALC_GEOMETRY, XPT_CONT_TARGET_IO, xpt_create_path(), XPT_DEBUG, xpt_dev_ccbq_resize(), XPT_DEV_MATCH, xpt_done(), XPT_EN_LUN, XPT_ENG_EXEC, XPT_ENG_INQ, XPT_FC_DEV_QUEUED, XPT_FC_IS_DEV_QUEUED, XPT_FC_IS_QUEUED, xpt_free_path(), xpt_freeze_devq(), xpt_freeze_devq_device(), XPT_GDEV_STATS, XPT_GDEV_TYPE, XPT_GDEVLIST, XPT_GET_SIM_KNOB, XPT_GET_SIM_KNOB_OLD, XPT_GET_TRAN_SETTINGS, XPT_IMMED_NOTIFY, XPT_IMMEDIATE_NOTIFY, XPT_MMC_GET_TRAN_SETTINGS, XPT_MMC_IO, XPT_MMC_SET_TRAN_SETTINGS, XPT_NOOP, XPT_NOTIFY_ACK, XPT_NOTIFY_ACKNOWLEDGE, XPT_NVME_ADMIN, XPT_NVME_IO, XPT_PATH_INQ, XPT_PATH_STATS, xpt_print(), XPT_REL_SIMQ, xpt_release_device(), xpt_release_devq(), xpt_release_devq_timeout, XPT_REPROBE_LUN, XPT_RESET_BUS, XPT_RESET_DEV, xpt_run_devq(), XPT_SASYNC_CB, xpt_schedule_devq(), XPT_SCSI_IO, XPT_SDEV_TYPE, XPT_SET_SIM_KNOB, XPT_SET_TRAN_SETTINGS, XPT_SMP_IO, XPT_TARGET_IO, XPT_TERM_IO, xptedtmatch(), and xptperiphlistmatch().
Referenced by ata_action(), ata_get_transfer_settings(), ata_set_transfer_settings(), mmc_action(), nvme_action(), scsi_action(), and scsi_set_transfer_settings().
const char * xpt_action_name | ( | uint32_t | action | ) |
Definition at line 5608 of file cam_xpt.c.
References map, kv::name, and kv::v.
Referenced by mmc_action(), xpt_action(), xpt_action_default(), xpt_async(), xpt_done(), xpt_done_process(), and xpt_rescan().
union ccb * xpt_alloc_ccb | ( | void | ) |
Definition at line 4612 of file cam_xpt.c.
Referenced by cam_compat_handle_0x17(), cam_compat_handle_0x18(), ctlfe_onoffline(), mmccam_start_discovery(), ndaioctl(), sdda_start_init_task(), sgwrite(), and xptdoioctl().
union ccb * xpt_alloc_ccb_nowait | ( | void | ) |
Definition at line 4621 of file cam_xpt.c.
Referenced by ata_scan_bus(), ata_scan_lun(), cam_periph_devctl_notify(), cam_periph_error(), camperiphscsisenseerror(), cfcs_onoffline(), chscsiversion(), passdoioctl(), pmpdone(), scsi_command_string(), scsi_scan_bus(), scsi_scan_lun(), scsi_sense_sbuf(), xpt_async(), and xpt_bus_register().
void xpt_async | ( | u_int32_t | async_code, |
struct cam_path * | path, | ||
void * | async_arg | ||
) |
Definition at line 4350 of file cam_xpt.c.
References ccb_async::async_arg_ptr, ccb_async::async_arg_size, ccb_async::async_code, cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_LUN_WILDCARD, CAM_UNLOCKED, ccb::casync, ccb_hdr::cbfcnp, ccb, ccb::ccb_h, cam_path::device, ccb_hdr::flags, ccb_hdr::func_code, cam_ed::lun_id, ccb_hdr::path, cam_path::periph, cam_eb::sim, xpt_action(), xpt_action_name(), xpt_alloc_ccb_nowait(), XPT_ASYNC, xpt_async_process(), xpt_async_size(), xpt_async_string(), xpt_clone_path(), xpt_free_ccb(), xpt_free_path(), xpt_freeze_devq(), xpt_freeze_simq(), and xpt_print().
Referenced by aprobedone(), aprobestart(), ata_dev_advinfo(), cam_periph_error(), camperiphdone(), mmcprobe_done(), nvme_dev_advinfo(), nvme_probe_done(), pmpdone(), pmponinvalidate(), probe_purge_old(), probedone(), scsi_dev_advinfo(), xpt_action_default(), xpt_bus_deregister(), xpt_bus_register(), xpt_start_tags(), and xpt_stop_tags().
Definition at line 3635 of file cam_xpt.c.
References cam_path::bus, cam_path::device, cam_path::target, xpt_acquire_bus(), xpt_acquire_device(), and xpt_acquire_target().
Referenced by xpt_async().
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 | ||
) |
Definition at line 3559 of file cam_xpt.c.
References xpt_xport_ops::alloc_device, cam_et::bus, cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_PATH_INVALID, CAM_REQ_CMP, CAM_RESRC_UNAVAIL, cam_path::device, cam_eb::eb_mtx, cam_ed::lun_id, xpt_xport::ops, cam_path::periph, cam_ed::target, cam_path::target, cam_et::target_id, cam_eb::xport, xpt_alloc_target(), xpt_find_bus(), xpt_find_device(), xpt_find_target(), xpt_lock_buses(), xpt_release_bus(), xpt_release_device(), xpt_release_target(), and xpt_unlock_buses().
Referenced by ata_dev_async(), scsi_dev_async(), xpt_bus_deregister(), xpt_create_path(), xptsetasyncbusfunc(), and xptsetasyncfunc().
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 | ||
) |
Definition at line 3527 of file cam_xpt.c.
References CAM_REQ_CMP, CAM_RESRC_UNAVAIL, and xpt_compile_path().
Referenced by ata_scan_bus(), ata_scan_lun(), cam_periph_alloc(), cam_periph_error(), cfcs_init(), cfcs_onoffline(), ctlfe_lun_enable(), ctlfe_offline(), ctlfe_online(), ctlfe_onoffline(), mmccam_start_discovery(), pmpdone(), pmpfreeze(), pmponinvalidate(), pmprelease(), pmpstart(), probe_purge_old(), scsi_scan_bus(), scsi_scan_lun(), ses_path_iter_devid_callback(), ses_paths_iter(), targbhasync(), targioctl(), xpt_action_default(), xpt_bus_register(), xpt_config(), xpt_create_path_unlocked(), xpt_init(), xpt_register_async(), and xptdoioctl().
cam_status xpt_create_path_unlocked | ( | 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 | ||
) |
Definition at line 3549 of file cam_xpt.c.
References cam_path::periph, and xpt_create_path().
void xpt_free_ccb | ( | union ccb * | free_ccb | ) |
Definition at line 4630 of file cam_xpt.c.
References ccb_hdr::alloc_flags, CAM_CCB_FROM_UMA, ccb::ccb_h, cam_periph::ccb_zone, ccb_hdr::path, and cam_path::periph.
Referenced by ata_scan_bus(), ata_scan_lun(), axptscandone(), cam_compat_handle_0x17(), cam_compat_handle_0x18(), cam_periph_devctl_notify(), camperiphdone(), cfcs_onoffline(), chscsiversion(), ctlfe_onoffline(), mmccam_start_discovery(), passdoioctl(), scsi_command_string(), scsi_scan_bus(), scsi_scan_lun(), scsi_sense_sbuf(), sdda_start_init_task(), sgread(), sgwrite(), targbhdone(), xpt_async(), xpt_async_process(), xpt_release_ccb(), xpt_rescan(), xpt_rescan_done(), xptdoioctl(), and xptscandone().
void xpt_free_path | ( | struct cam_path * | path | ) |
Definition at line 3672 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, and xpt_release_path().
Referenced by ata_scan_bus(), axptscandone(), cam_periph_alloc(), cam_periph_error(), camperiphfree(), cfcs_shutdown(), ctlfe_lun_enable(), ctlfe_offline(), ctlfe_online(), ctlfe_onoffline(), pmpdone(), pmpfreeze(), pmponinvalidate(), pmprelease(), pmpstart(), probe_purge_old(), scsi_scan_bus(), ses_path_iter_devid_callback(), ses_paths_iter(), targbhasync(), targioctl(), xpt_action_default(), xpt_async(), xpt_async_process(), xpt_bus_register(), xpt_init(), xpt_register_async(), xpt_rescan(), xpt_rescan_done(), xptdoioctl(), and xptscandone().
int xpt_getattr | ( | char * | buf, |
size_t | len, | ||
const char * | attr, | ||
struct cam_path * | path | ||
) |
Definition at line 1243 of file cam_xpt.c.
References ccb_dev_advinfo::buf, ccb_dev_advinfo::bufsiz, ccb_dev_advinfo::buftype, CAM_DEV_QFRZN, CAM_PRIORITY_NORMAL, cam_release_devq(), CAM_SCSI_DEVID_MAXLEN, ccb_dev_advinfo::ccb_h, CDAI_FLAG_NONE, CDAI_TYPE_PHYS_PATH, CDAI_TYPE_SCSI_DEVID, CDAI_TYPE_SERIAL_NUM, ccb_dev_advinfo::flags, ccb_hdr::func_code, scsi_vpd_id_descriptor::id_type, scsi_vpd_id_descriptor::identifier, scsi_vpd_id_descriptor::length, ccb_hdr::path, scsi_vpd_id_descriptor::proto_codeset, ccb_dev_advinfo::provsiz, scsi_devid_is_lun_eui64(), scsi_devid_is_lun_md5(), scsi_devid_is_lun_naa(), scsi_devid_is_lun_name(), scsi_devid_is_lun_t10(), scsi_devid_is_lun_uuid(), scsi_get_devid(), ccb_hdr::status, SVPD_ID_CODESET_ASCII, SVPD_ID_CODESET_MASK, SVPD_ID_CODESET_UTF8, SVPD_ID_TYPE_MASK, SVPD_ID_TYPE_UUID, xpt_action(), XPT_DEV_ADVINFO, xpt_path_assert, and xpt_setup_ccb().
Referenced by adagetattr(), dagetattr(), ndagetattr(), pass_add_physpath(), and sddagetattr().
void xpt_hold_boot | ( | void | ) |
Definition at line 5148 of file cam_xpt.c.
References xpt_hold_boot_locked(), xpt_lock_buses(), and xpt_unlock_buses().
Referenced by pmpasync(), pmpregister(), and xpt_config().
void xpt_lock_buses | ( | void | ) |
Definition at line 5316 of file cam_xpt.c.
References xsoftc.
Referenced by cam_periph_acquire(), cam_periph_acquire_first(), cam_periph_acquire_next(), cam_periph_alloc(), cam_periph_doacquire(), cam_periph_find(), cam_periph_list(), cam_periph_release_locked(), camperiphfree(), enc_async(), periphdriver_register(), periphdriver_unregister(), xpt_acquire_bus(), xpt_bus_register(), xpt_compile_path(), xpt_find_bus(), xpt_hold_boot(), xpt_path_counts(), xpt_release_boot(), xpt_release_bus(), xpt_rescan(), xpt_scanner_thread(), xptbustraverse(), xptdoioctl(), xptedtdevicefunc(), xptedtmatch(), xptpdperiphtraverse(), xptperiphtraverse(), and xptplistpdrvfunc().
Definition at line 3480 of file cam_xpt.c.
References ccb::ccb_h, ccb_hdr::flags, ccb_hdr::func_code, ccb_hdr::retry_count, and ccb_hdr::timeout.
Referenced by passsendccb(), passstart(), and xptdoioctl().
Definition at line 3718 of file cam_xpt.c.
References cam_path::bus, CAM_BUS_WILDCARD, CAM_LUN_WILDCARD, CAM_TARGET_WILDCARD, cam_path::device, cam_ed::lun_id, cam_eb::path_id, cam_path::target, and cam_et::target_id.
Referenced by cam_periph_find(), cam_periph_list(), and xpt_rescan().
Definition at line 3752 of file cam_xpt.c.
References cam_et::bus, cam_path::bus, CAM_BUS_WILDCARD, CAM_LUN_WILDCARD, CAM_TARGET_WILDCARD, cam_path::device, cam_ed::lun_id, cam_eb::path_id, cam_ed::target, cam_path::target, and cam_et::target_id.
void xpt_path_counts | ( | struct cam_path * | path, |
uint32_t * | bus_ref, | ||
uint32_t * | periph_ref, | ||
uint32_t * | target_ref, | ||
uint32_t * | device_ref | ||
) |
Definition at line 3681 of file cam_xpt.c.
References cam_path::bus, cam_path::device, cam_path::periph, cam_periph::refcount, cam_ed::refcount, cam_et::refcount, cam_eb::refcount, cam_path::target, xpt_lock_buses(), and xpt_unlock_buses().
|
inlinestatic |
Definition at line 156 of file cam_xpt.h.
References CAM_PRIORITY_NORMAL, ccb_pathinq::ccb_h, ccb_hdr::func_code, xpt_action(), XPT_PATH_INQ, and xpt_setup_ccb().
Referenced by _ata_announce_periph(), adaregister(), aprobedone(), ata_device_transport(), ata_scan_bus(), ata_scan_lun(), ata_set_transfer_settings(), camperiphfree(), cdregister(), chregister(), daregister(), mmc_announce_periph(), mmc_scan_lun(), mmcprobe_start(), ndaioctl(), ndaregister(), nvme_announce_periph(), nvme_device_transport(), nvme_scan_lun(), passregister(), probeschedule(), ptctor(), saregister(), sgregister(), targenable(), xpt_bus_register(), and xptsetasyncbusfunc().
Definition at line 3895 of file cam_xpt.c.
References CAM_LUN_WILDCARD, cam_path::device, and cam_ed::lun_id.
Referenced by cam_periph_alloc(), cam_periph_error(), ctlfe_lun_disable(), mmc_scan_lun(), ndaregister(), nvme_probe_start(), nvme_scan_lun(), and sgioctl().
struct mtx * xpt_path_mtx | ( | struct cam_path * | path | ) |
Definition at line 5328 of file cam_xpt.c.
References cam_path::device, and cam_ed::device_mtx.
Referenced by ata_scan_bus(), cam_periph_mtx(), scsi_scan_bus(), xpt_done_process(), and xpt_scanner_thread().
Definition at line 3880 of file cam_xpt.c.
References cam_path::bus, and cam_eb::path_id.
Referenced by cam_periph_alloc(), cam_periph_error(), ctlfeasync(), enc_async(), pmpdone(), pmpfreeze(), pmponinvalidate(), pmprelease(), pmpstart(), probe_purge_old(), ses_path_iter_devid_callback(), sgioctl(), and targbhasync().
struct cam_periph * xpt_path_periph | ( | struct cam_path * | path | ) |
Definition at line 3911 of file cam_xpt.c.
References cam_periph::path, and cam_path::periph.
Referenced by adaerror(), cam_periph_devctl_notify(), cam_periph_error(), camperiphscsisenseerror(), camperiphscsistatuserror(), cd6byteworkaround(), cdasync(), cderror(), cdrunccb(), cmd6workaround(), ctlfe_datamove(), ctlfe_done(), daasync(), daerror(), ndaerror(), and saerror().
int xpt_path_sbuf | ( | struct cam_path * | path, |
struct sbuf * | sb | ||
) |
Definition at line 3845 of file cam_xpt.c.
References cam_path::bus, cam_sim::bus_id, cam_path::device, cam_ed::lun_id, cam_path::periph, cam_periph::periph_name, cam_eb::sim, cam_sim::sim_name, cam_path::target, cam_et::target_id, cam_periph::unit_number, and cam_sim::unit_number.
Referenced by xpt_path_string(), xpt_print(), and xpt_print_path().
Definition at line 3904 of file cam_xpt.c.
References cam_path::bus, and cam_eb::sim.
Referenced by cam_periph_alloc(), ctlfeasync(), and sgioctl().
device_t xpt_path_sim_device | ( | const struct cam_path * | path | ) |
Return the device_t associated with the path.
When a SIM is created, it registers a bus with a NEWBUS device_t. This is stored in the internal cam_eb bus structure. There is no guarnatee any given path will have a device_t
associated with it (it's legal to call xpt_bus_register
with a NULL
device_t
.
path | Path to return the device_t for. |
Definition at line 5551 of file cam_xpt.c.
References cam_path::bus, and cam_eb::parent_dev.
Referenced by mmccam_start_discovery().
int xpt_path_string | ( | struct cam_path * | path, |
char * | str, | ||
size_t | str_len | ||
) |
Definition at line 3833 of file cam_xpt.c.
References xpt_path_sbuf().
Referenced by cam_error_string(), scsi_sense_sbuf(), and smp_error_sbuf().
target_id_t xpt_path_target_id | ( | struct cam_path * | path | ) |
Definition at line 3886 of file cam_xpt.c.
References CAM_TARGET_WILDCARD, cam_path::target, and cam_et::target_id.
Referenced by cam_periph_alloc(), cam_periph_error(), ctlfe_lun_disable(), probe_purge_old(), and sgioctl().
uint32_t xpt_poll_setup | ( | union ccb * | start_ccb | ) |
Definition at line 3180 of file cam_xpt.c.
References cam_path::bus, cam_sim_pollable(), ccb::ccb_h, cam_ed::ccbq, cam_ccbq::dev_openings, cam_path::device, cam_sim::devq, ccb_hdr::path, cam_devq::send_mtx, cam_devq::send_openings, cam_ed::sim, cam_eb::sim, ccb_hdr::timeout, and xpt_sim_poll().
Referenced by cam_periph_runccb().
void xpt_pollwait | ( | union ccb * | start_ccb, |
uint32_t | timeout | ||
) |
Definition at line 3214 of file cam_xpt.c.
References cam_path::bus, CAM_CMD_TIMEOUT, CAM_REQ_INPROG, cam_sim_pollable(), CAM_STATUS_MASK, ccb::ccb_h, ccb_hdr::path, cam_eb::sim, ccb_hdr::status, and xpt_sim_poll().
Referenced by cam_periph_runccb().
void xpt_print | ( | struct cam_path * | path, |
const char * | fmt, | ||
... | |||
) |
Definition at line 3814 of file cam_xpt.c.
References xpt_path_sbuf(), and XPT_PRINT_LEN.
Referenced by abort_all_pending(), ada_zone_cmd(), adacleanup(), adaclose(), adadump(), adaflush(), adaregister(), adaresume(), adaspindown(), adastart(), aprobedone(), aprobestart(), ata_scan_lun(), ata_set_transfer_settings(), cam_periph_error(), camperiphfree(), camperiphnextunit(), cd6byteworkaround(), cdcleanup(), cddone(), cdgetmode(), cdregister(), cdreportkey(), cdstart(), chdone(), chgetelemstatus(), chgetparams(), chregister(), cmd6workaround(), ctlfe_dump_queue(), ctlfedone(), ctlfeoninvalidate(), ctlferegister(), da_delete_trim(), da_delete_unmap(), da_delete_ws(), da_zone_cmd(), daasync(), dacleanup(), dadone(), dadone_probebdc(), dadone_proberc(), dadump(), daerror(), daopen(), daregister(), dasetgeom(), dashutdown(), dastart(), enc_ctor(), mmc_scan_lun(), ndacleanup(), ndaclose(), ndadump(), ndaflush(), ndaregister(), nvme_probe_done(), nvme_scan_lun(), passcopysglist(), passcreatezone(), passdoioctl(), passdone(), passmemdone(), passmemsetup(), passopen(), passregister(), pmpcleanup(), probedone(), proberequestbackoff(), probestart(), ptdone(), sacleanup(), saclose(), saerror(), saioctl(), saloadtimeouts(), samount(), saparamsetlist(), saregister(), sasetparams(), sastart(), sastrategy(), scsi_scan_lun(), scsi_set_transfer_settings(), sdda_add_part(), sgregister(), targbhenlun(), targendislun(), targreturnccb(), targstart(), xpt_action_default(), xpt_async(), xpt_bus_register(), and xpt_rescan().
void xpt_print_device | ( | struct cam_ed * | device | ) |
Definition at line 3799 of file cam_xpt.c.
References cam_sim::bus_id, cam_ed::lun_id, cam_ed::sim, cam_sim::sim_name, cam_ed::target, cam_et::target_id, and cam_sim::unit_number.
void xpt_print_path | ( | struct cam_path * | path | ) |
Definition at line 3786 of file cam_xpt.c.
References xpt_path_sbuf(), and XPT_PRINT_LEN.
Referenced by mmc_handle_reply(), sagetparams(), sasetparams(), and sastrategy().
cam_status xpt_register_async | ( | int | event, |
ac_callback_t * | cbfunc, | ||
void * | cbarg, | ||
struct cam_path * | path | ||
) |
Definition at line 5213 of file cam_xpt.c.
References AC_FOUND_DEVICE, AC_PATH_REGISTERED, ccb_setasync::callback, ccb_setasync::callback_arg, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_LUN_WILDCARD, CAM_PRIORITY_NORMAL, CAM_REQ_CMP, CAM_TARGET_WILDCARD, CAM_XPT_PATH_ID, ccb_setasync::ccb_h, ccb_setasync::event_enable, ccb_hdr::func_code, ccb_hdr::path, ccb_hdr::status, xpt_action(), xpt_create_path(), xpt_for_all_busses(), xpt_for_all_devices(), xpt_free_path(), xpt_path_lock, xpt_path_unlock, XPT_SASYNC_CB, xpt_setup_ccb(), xptsetasyncbusfunc, and xptsetasyncfunc.
Referenced by adaoninvalidate(), adaregister(), cdoninvalidate(), cdregister(), choninvalidate(), chregister(), daoninvalidate(), daregister(), enc_ctor(), enc_oninvalidate(), ndaoninvalidate(), ndaregister(), passoninvalidate(), passregister(), pmponinvalidate(), pmpregister(), ptctor(), ptoninvalidate(), saoninvalidate(), saregister(), sdda_start_init(), sddaoninvalidate(), sgoninvalidate(), and sgregister().
void xpt_release_boot | ( | void | ) |
Definition at line 5157 of file cam_xpt.c.
References xpt_finishconfig_task(), xpt_lock_buses(), xpt_unlock_buses(), and xsoftc.
Referenced by pmpasync(), pmpdone(), xpt_boot_delay(), xpt_finishconfig_task(), and xpt_rescan_done().
void xpt_release_path | ( | struct cam_path * | path | ) |
Definition at line 3654 of file cam_xpt.c.
References cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, cam_path::device, cam_path::target, xpt_release_bus(), xpt_release_device(), and xpt_release_target().
Referenced by ata_dev_async(), scsi_dev_async(), xpt_bus_deregister(), xpt_free_path(), xptsetasyncbusfunc(), and xptsetasyncfunc().
void xpt_rescan | ( | union ccb * | ccb | ) |
Definition at line 840 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, CAM_LUN_WILDCARD, CAM_PRIORITY_XPT, CAM_TARGET_WILDCARD, ccb_hdr::cbfcnp, ccb::ccb_h, cam_path::device, ccb_hdr::func_code, cam_ed::lun_id, ccb_hdr::path, ccb_hdr::sim_links, cam_path::target, cam_et::target_id, xpt_action_name(), xpt_free_ccb(), xpt_free_path(), xpt_hold_boot_locked(), xpt_lock_buses(), xpt_path_comp(), xpt_print(), xpt_rescan_done(), XPT_SCAN_BUS, XPT_SCAN_LUN, XPT_SCAN_TGT, xpt_setup_ccb(), xpt_unlock_buses(), and xsoftc.
Referenced by cam_periph_error(), cfcs_onoffline(), mmccam_start_discovery(), pmpdone(), and xpt_bus_register().
Definition at line 3520 of file cam_xpt.c.
References xpt_setup_ccb_flags().
Referenced by _ata_announce_periph(), _scsi_announce_periph(), abort_all_pending(), adaasync(), adadump(), adaspindown(), aprobedone(), aproberequestdefaultnegotiation(), aprobestart(), ata_device_transport(), ata_scan_bus(), ata_scan_lun(), cam_freeze_devq(), cam_periph_bus_settle(), cam_periph_devctl_notify(), cam_periph_ioctl(), cam_release_devq(), camperiphfree(), camperiphscsisenseerror(), camperiphscsistatuserror(), cddone(), chscsiversion(), ctlfe_dump_queue(), ctlfe_onoffline(), ctlfeoninvalidate(), ctlferegister(), dadone_proberc(), dadump(), dasetgeom(), dasysctlinit(), mmc_announce_periph(), ndadump(), ndaioctl(), nvme_announce_periph(), nvme_device_transport(), passdoioctl(), pmpdone(), pmpstart(), proberequestbackoff(), proberequestdefaultnegotiation(), saextget(), saregister(), scsi_command_string(), scsi_devise_transport(), scsi_scan_bus(), scsi_scan_lun(), scsi_sense_sbuf(), scsi_set_transfer_settings(), scsi_toggle_tags(), sdda_add_part(), sdda_start_init_task(), sddaasync(), sddadump(), ses_paths_iter(), ses_set_physpath(), ses_setphyspath_callback(), sgwrite(), targbhdislun(), targbhenlun(), targendislun(), targgetccb(), targioctl(), targusermerge(), xpt_getattr(), xpt_path_inq(), xpt_register_async(), xpt_rescan(), xpt_run_allocq(), xpt_start_tags(), xpt_stop_tags(), xptdoioctl(), and xptsetasyncfunc().
void xpt_setup_ccb_flags | ( | struct ccb_hdr * | ccb_h, |
struct cam_path * | path, | ||
u_int32_t | priority, | ||
u_int32_t | flags | ||
) |
Definition at line 3496 of file cam_xpt.c.
References cam_path::bus, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_TARGET_WILDCARD, CAM_UNQUEUED_INDEX, cam_ed::ccbq, cam_path::device, ccb_hdr::flags, cam_ed::flags, cam_pinfo::generation, camq::generation, cam_pinfo::index, cam_ed::lun_id, ccb_hdr::path, ccb_hdr::path_id, cam_eb::path_id, ccb_hdr::pinfo, cam_pinfo::priority, cam_ccbq::queue, cam_path::target, ccb_hdr::target_id, cam_et::target_id, ccb_hdr::target_lun, and ccb_hdr::xflags.
Referenced by ctlfe_requeue_ccb(), passdoioctl(), and xpt_setup_ccb().
void xpt_sim_poll | ( | struct cam_sim * | sim | ) |
Definition at line 3165 of file cam_xpt.c.
References cam_sim_pollable(), camisr_runqueue(), cam_sim::mtx, and cam_sim::sim_poll.
Referenced by xpt_poll_setup(), and xpt_pollwait().
void xpt_unlock_buses | ( | void | ) |
Definition at line 5322 of file cam_xpt.c.
References xsoftc.
Referenced by cam_periph_acquire(), cam_periph_acquire_first(), cam_periph_acquire_next(), cam_periph_alloc(), cam_periph_doacquire(), cam_periph_find(), cam_periph_list(), cam_periph_release_locked(), camperiphfree(), enc_async(), periphdriver_register(), periphdriver_unregister(), xpt_acquire_bus(), xpt_bus_register(), xpt_compile_path(), xpt_find_bus(), xpt_hold_boot(), xpt_path_counts(), xpt_release_boot(), xpt_release_bus(), xpt_rescan(), xpt_scanner_thread(), xptbustraverse(), xptdoioctl(), xptedtdevicefunc(), xptedtmatch(), xptpdperiphtraverse(), xptperiphtraverse(), and xptplistpdrvfunc().