FreeBSD kernel CAM code
|
#include "opt_printf.h"
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bio.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/proc.h>
#include <sys/sbuf.h>
#include <sys/smp.h>
#include <sys/taskqueue.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/sysctl.h>
#include <sys/kthread.h>
#include <cam/cam.h>
#include <cam/cam_ccb.h>
#include <cam/cam_iosched.h>
#include <cam/cam_periph.h>
#include <cam/cam_queue.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/cam_compat.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 | xpt_softc |
struct | xpt_traverse_config |
struct | cam_doneq |
struct | kv |
Macros | |
#define | XPT_PRINT_MAXLEN 512 |
#define | XPT_PRINT_LEN 128 |
#define | CAM_MAX_HIGHPOWER 4 |
Typedefs | |
typedef int | xpt_busfunc_t(struct cam_eb *bus, void *arg) |
typedef int | xpt_targetfunc_t(struct cam_et *target, void *arg) |
typedef int | xpt_devicefunc_t(struct cam_ed *device, void *arg) |
typedef int | xpt_periphfunc_t(struct cam_periph *periph, void *arg) |
typedef int | xpt_pdrvfunc_t(struct periph_driver **pdrv, void *arg) |
Enumerations | |
enum | dev_match_ret { DM_RET_COPY = 0x01 , DM_RET_FLAG_MASK = 0x0f , DM_RET_NONE = 0x00 , DM_RET_STOP = 0x10 , DM_RET_DESCEND = 0x20 , DM_RET_ERROR = 0x30 , DM_RET_ACTION_MASK = 0xf0 } |
enum | xpt_traverse_depth { XPT_DEPTH_BUS , XPT_DEPTH_TARGET , XPT_DEPTH_DEVICE , XPT_DEPTH_PERIPH } |
Functions | |
__FBSDID ("$FreeBSD$") | |
_Static_assert (XPT_PRINT_LEN<=XPT_PRINT_MAXLEN, "XPT_PRINT_LEN is too large") | |
MALLOC_DEFINE (M_CAMXPT, "CAM XPT", "CAM XPT buffers") | |
MALLOC_DEFINE (M_CAMDEV, "CAM DEV", "CAM devices") | |
MALLOC_DEFINE (M_CAMCCB, "CAM CCB", "CAM CCBs") | |
MALLOC_DEFINE (M_CAMPATH, "CAM path", "CAM paths") | |
MTX_SYSINIT (xpt_topo_init, &xsoftc.xpt_topo_lock, "XPT topology lock", MTX_DEF) | |
SYSCTL_INT (_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time") | |
SYSCTL_UINT (_kern_cam, OID_AUTO, xpt_generation, CTLFLAG_RD, &xsoftc.xpt_generation, 0, "CAM peripheral generation count") | |
SYSCTL_INT (_kern_cam, OID_AUTO, announce_nosbuf, CTLFLAG_RWTUN, &xsoftc.announce_nosbuf, 0, "Don't use sbuf for announcements") | |
SYSCTL_INT (_kern_cam, OID_AUTO, num_doneqs, CTLFLAG_RDTUN, &cam_num_doneqs, 0, "Number of completion queues/threads") | |
PERIPHDRIVER_DECLARE (xpt, xpt_driver) | |
SYSCTL_UINT (_kern_cam, OID_AUTO, dflags, CTLFLAG_RWTUN, &cam_dflags, 0, "Enabled debug flags") | |
SYSCTL_UINT (_kern_cam, OID_AUTO, debug_delay, CTLFLAG_RWTUN, &cam_debug_delay, 0, "Delay in us after each debug message") | |
static int | cam_module_event_handler (module_t, int, void *) |
static int | xpt_init (void *) |
DECLARE_MODULE (cam, cam_moduledata, SI_SUB_CONFIGURE, SI_ORDER_SECOND) | |
MODULE_VERSION (cam, 1) | |
static void | xpt_async_bcast (struct async_list *async_head, u_int32_t async_code, struct cam_path *path, void *async_arg) |
static path_id_t | xptnextfreepathid (void) |
static path_id_t | xptpathid (const char *sim_name, int sim_unit, int sim_bus) |
static union ccb * | xpt_get_ccb (struct cam_periph *periph) |
static union ccb * | xpt_get_ccb_nowait (struct cam_periph *periph) |
static void | xpt_run_allocq (struct cam_periph *periph, int sleep) |
static void | xpt_run_allocq_task (void *context, int pending) |
static void | xpt_run_devq (struct cam_devq *devq) |
static void | xpt_acquire_bus (struct cam_eb *bus) |
static void | xpt_release_bus (struct cam_eb *bus) |
static uint32_t | xpt_freeze_devq_device (struct cam_ed *dev, u_int count) |
static int | xpt_release_devq_device (struct cam_ed *dev, u_int count, int run_queue) |
static struct cam_et * | xpt_alloc_target (struct cam_eb *bus, target_id_t target_id) |
static void | xpt_acquire_target (struct cam_et *target) |
static void | xpt_release_target (struct cam_et *target) |
static struct cam_eb * | xpt_find_bus (path_id_t path_id) |
static struct cam_et * | xpt_find_target (struct cam_eb *bus, target_id_t target_id) |
static struct cam_ed * | xpt_find_device (struct cam_et *target, lun_id_t lun_id) |
static void | xpt_config (void *arg) |
static void | xpt_hold_boot_locked (void) |
static int | xpt_schedule_dev (struct camq *queue, cam_pinfo *dev_pinfo, u_int32_t new_priority) |
static void | xptaction (struct cam_sim *sim, union ccb *work_ccb) |
static void | xptpoll (struct cam_sim *sim) |
static void | camisr_runqueue (void) |
static void | xpt_done_process (struct ccb_hdr *ccb_h) |
static void | xpt_done_td (void *) |
static void | xpt_async_td (void *) |
static dev_match_ret | xptbusmatch (struct dev_match_pattern *patterns, u_int num_patterns, struct cam_eb *bus) |
static dev_match_ret | xptdevicematch (struct dev_match_pattern *patterns, u_int num_patterns, struct cam_ed *device) |
static dev_match_ret | xptperiphmatch (struct dev_match_pattern *patterns, u_int num_patterns, struct cam_periph *periph) |
static int | xptedtmatch (struct ccb_dev_match *cdm) |
static int | xptperiphlistmatch (struct ccb_dev_match *cdm) |
static int | xptbustraverse (struct cam_eb *start_bus, xpt_busfunc_t *tr_func, void *arg) |
static int | xpttargettraverse (struct cam_eb *bus, struct cam_et *start_target, xpt_targetfunc_t *tr_func, void *arg) |
static int | xptdevicetraverse (struct cam_et *target, struct cam_ed *start_device, xpt_devicefunc_t *tr_func, void *arg) |
static int | xptperiphtraverse (struct cam_ed *device, struct cam_periph *start_periph, xpt_periphfunc_t *tr_func, void *arg) |
static int | xptpdrvtraverse (struct periph_driver **start_pdrv, xpt_pdrvfunc_t *tr_func, void *arg) |
static int | xptpdperiphtraverse (struct periph_driver **pdrv, struct cam_periph *start_periph, xpt_periphfunc_t *tr_func, void *arg) |
static void | xpt_finishconfig_task (void *context, int pending) |
static void | xpt_dev_async_default (u_int32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg) |
static struct cam_ed * | xpt_alloc_device_default (struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) |
static cam_status | xptregister (struct cam_periph *periph, void *arg) |
static __inline int | xpt_schedule_devq (struct cam_devq *devq, struct cam_ed *dev) |
static __inline int | device_is_queued (struct cam_ed *device) |
static int | xptopen (struct cdev *dev, int flags, int fmt, struct thread *td) |
static int | xptclose (struct cdev *dev, int flag, int fmt, struct thread *td) |
static int | xptioctl (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) |
static int | xptdoioctl (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) |
static struct xpt_proto * | xpt_proto_find (cam_proto proto) |
static void | xpt_rescan_done (struct cam_periph *periph, union ccb *done_ccb) |
static void | xpt_scanner_thread (void *dummy) |
void | xpt_rescan (union ccb *ccb) |
int32_t | xpt_add_periph (struct cam_periph *periph) |
void | xpt_remove_periph (struct cam_periph *periph) |
void | xpt_announce_periph (struct cam_periph *periph, char *announce_string) |
void | xpt_announce_periph_sbuf (struct cam_periph *periph, struct sbuf *sb, char *announce_string) |
void | xpt_announce_quirks (struct cam_periph *periph, int quirks, char *bit_string) |
void | xpt_announce_quirks_sbuf (struct cam_periph *periph, struct sbuf *sb, int quirks, char *bit_string) |
void | xpt_denounce_periph (struct cam_periph *periph) |
void | xpt_denounce_periph_sbuf (struct cam_periph *periph, struct sbuf *sb) |
int | xpt_getattr (char *buf, size_t len, const char *attr, struct cam_path *path) |
static int | xptedtbusfunc (struct cam_eb *bus, void *arg) |
static int | xptedttargetfunc (struct cam_et *target, void *arg) |
static int | xptedtdevicefunc (struct cam_ed *device, void *arg) |
static int | xptedtperiphfunc (struct cam_periph *periph, void *arg) |
static int | xptplistpdrvfunc (struct periph_driver **pdrv, void *arg) |
static int | xptplistperiphfunc (struct cam_periph *periph, void *arg) |
static int | xptdefbusfunc (struct cam_eb *bus, void *arg) |
static int | xptdeftargetfunc (struct cam_et *target, void *arg) |
static int | xptdefdevicefunc (struct cam_ed *device, void *arg) |
static int | xptdefperiphfunc (struct cam_periph *periph, void *arg) |
static int | xpt_for_all_busses (xpt_busfunc_t *tr_func, void *arg) |
static int | xpt_for_all_devices (xpt_devicefunc_t *tr_func, void *arg) |
static int | xptsetasyncfunc (struct cam_ed *device, void *arg) |
static int | xptsetasyncbusfunc (struct cam_eb *bus, void *arg) |
void | xpt_action (union ccb *start_ccb) |
void | xpt_action_default (union ccb *start_ccb) |
void | xpt_sim_poll (struct cam_sim *sim) |
uint32_t | xpt_poll_setup (union ccb *start_ccb) |
void | xpt_pollwait (union ccb *start_ccb, uint32_t timeout) |
void | xpt_schedule (struct cam_periph *periph, u_int32_t new_priority) |
void | xpt_merge_ccb (union ccb *dst_ccb, union ccb *src_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) |
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 *periph, path_id_t path_id, target_id_t target_id, lun_id_t lun_id) |
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_ptr, struct cam_path *path) |
void | xpt_release_path (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) |
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,...) |
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) |
void | xpt_release_ccb (union ccb *free_ccb) |
CAM_XPT_XPORT (xport_default) | |
int | xpt_bus_register (struct cam_sim *sim, device_t parent, uint32_t bus) |
int | xpt_bus_deregister (path_id_t pathid) |
static const char * | xpt_async_string (u_int32_t async_code) |
static int | xpt_async_size (u_int32_t async_code) |
static int | xpt_async_process_dev (struct cam_ed *device, void *arg) |
static int | xpt_async_process_tgt (struct cam_et *target, void *arg) |
static void | xpt_async_process (struct cam_periph *periph, union ccb *ccb) |
void | xpt_async (u_int32_t async_code, struct cam_path *path, void *async_arg) |
u_int32_t | xpt_freeze_devq (struct cam_path *path, u_int count) |
u_int32_t | xpt_freeze_simq (struct cam_sim *sim, u_int count) |
static void | xpt_release_devq_timeout (void *arg) |
void | xpt_release_devq (struct cam_path *path, u_int count, int run_queue) |
void | xpt_release_simq (struct cam_sim *sim, int run_queue) |
void | xpt_done (union ccb *done_ccb) |
void | xpt_done_direct (union ccb *done_ccb) |
union ccb * | xpt_alloc_ccb (void) |
union ccb * | xpt_alloc_ccb_nowait (void) |
void | xpt_free_ccb (union ccb *free_ccb) |
union ccb * | cam_periph_getccb (struct cam_periph *periph, u_int32_t priority) |
static void | xpt_destroy_device (void *context, int pending) |
struct cam_ed * | xpt_alloc_device (struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) |
void | xpt_acquire_device (struct cam_ed *device) |
void | xpt_release_device (struct cam_ed *device) |
u_int32_t | xpt_dev_ccbq_resize (struct cam_path *path, int newopenings) |
void | xpt_start_tags (struct cam_path *path) |
void | xpt_stop_tags (struct cam_path *path) |
static void | xpt_boot_delay (void *arg) |
static void | xpt_ch_done (void *arg) |
SYSINIT (xpt_hw_delay, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, xpt_ch_done, NULL) | |
void | xpt_hold_boot (void) |
void | xpt_release_boot (void) |
static int | xptpassannouncefunc (struct cam_ed *device, void *arg) |
cam_status | xpt_register_async (int event, ac_callback_t *cbfunc, void *cbarg, struct cam_path *path) |
void | xpt_lock_buses (void) |
void | xpt_unlock_buses (void) |
struct mtx * | xpt_path_mtx (struct cam_path *path) |
device_t | xpt_path_sim_device (const struct cam_path *path) |
Return the device_t associated with the path. More... | |
const char * | xpt_action_name (uint32_t action) |
typedef int xpt_devicefunc_t(struct cam_ed *device, void *arg) |
typedef int xpt_pdrvfunc_t(struct periph_driver **pdrv, void *arg) |
typedef int xpt_periphfunc_t(struct cam_periph *periph, void *arg) |
typedef int xpt_targetfunc_t(struct cam_et *target, void *arg) |
enum dev_match_ret |
enum xpt_traverse_depth |
__FBSDID | ( | "$FreeBSD$" | ) |
_Static_assert | ( | XPT_PRINT_LEN<= | XPT_PRINT_MAXLEN, |
"XPT_PRINT_LEN is too large" | |||
) |
|
static |
Definition at line 754 of file cam_xpt.c.
References xpt_init().
union ccb * cam_periph_getccb | ( | struct cam_periph * | periph, |
u_int32_t | priority | ||
) |
Definition at line 4695 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, cam_periph_assert, cam_periph_sleep, cam_periph::immediate_priority, cam_periph::path, ccb_hdr::periph_links, ccb_hdr::pinfo, cam_pinfo::priority, and xpt_run_allocq().
Referenced by adaclose(), adaflush(), cam_periph_ioctl(), cdgetmode(), cdpause(), cdplay(), cdplaymsf(), cdplaytracks(), cdprevent(), cdreaddvdstructure(), cdreadsubchannel(), cdreadtoc(), cdreportkey(), cdsendkey(), cdsetmode(), cdsetspeed(), cdstartunit(), cdstopunit(), chexchange(), chgetelemstatus(), chgetparams(), chielem(), chmove(), chposition(), chsetvoltag(), daclose(), daprevent(), dashutdown(), enc_fsm_step(), enc_runcmd(), ndaclose(), ndaflush(), passdoioctl(), saerase(), sagetparams(), sagetpos(), saloadunload(), samount(), saprevent(), sardpos(), sareservereleaseunit(), saretension(), sarewind(), sasetparams(), sasetpos(), sasetprot(), saspace(), sawritefilemarks(), ses_set_timed_completion(), and sgioctl().
CAM_XPT_XPORT | ( | xport_default | ) |
|
static |
Definition at line 5520 of file cam_xpt.c.
References cam_doneq::cam_doneq_mtx, cam_doneqs, cam_num_doneqs, and xpt_done_process().
Referenced by xpt_sim_poll().
DECLARE_MODULE | ( | cam | , |
cam_moduledata | , | ||
SI_SUB_CONFIGURE | , | ||
SI_ORDER_SECOND | |||
) |
|
static |
Definition at line 352 of file cam_xpt.c.
References CAM_UNQUEUED_INDEX, cam_ed::devq_entry, and cam_pinfo::index.
Referenced by xpt_done_process(), and xpt_freeze_devq_device().
MALLOC_DEFINE | ( | M_CAMCCB | , |
"CAM CCB" | , | ||
"CAM CCBs" | |||
) |
MALLOC_DEFINE | ( | M_CAMDEV | , |
"CAM DEV" | , | ||
"CAM devices" | |||
) |
MALLOC_DEFINE | ( | M_CAMPATH | , |
"CAM path" | , | ||
"CAM paths" | |||
) |
MALLOC_DEFINE | ( | M_CAMXPT | , |
"CAM XPT" | , | ||
"CAM XPT buffers" | |||
) |
MODULE_VERSION | ( | cam | , |
1 | |||
) |
MTX_SYSINIT | ( | xpt_topo_init | , |
&xsoftc. | xpt_topo_lock, | ||
"XPT topology lock" | , | ||
MTX_DEF | |||
) |
PERIPHDRIVER_DECLARE | ( | xpt | , |
xpt_driver | |||
) |
SYSCTL_INT | ( | _kern_cam | , |
OID_AUTO | , | ||
announce_nosbuf | , | ||
CTLFLAG_RWTUN | , | ||
&xsoftc. | announce_nosbuf, | ||
0 | , | ||
"Don't use sbuf for announcements" | |||
) |
SYSCTL_INT | ( | _kern_cam | , |
OID_AUTO | , | ||
boot_delay | , | ||
CTLFLAG_RDTUN | , | ||
&xsoftc. | boot_delay, | ||
0 | , | ||
"Bus registration wait time" | |||
) |
SYSCTL_INT | ( | _kern_cam | , |
OID_AUTO | , | ||
num_doneqs | , | ||
CTLFLAG_RDTUN | , | ||
& | cam_num_doneqs, | ||
0 | , | ||
"Number of completion queues/threads" | |||
) |
SYSCTL_UINT | ( | _kern_cam | , |
OID_AUTO | , | ||
debug_delay | , | ||
CTLFLAG_RWTUN | , | ||
& | cam_debug_delay, | ||
0 | , | ||
"Delay in us after each debug message" | |||
) |
SYSCTL_UINT | ( | _kern_cam | , |
OID_AUTO | , | ||
dflags | , | ||
CTLFLAG_RWTUN | , | ||
& | cam_dflags, | ||
0 | , | ||
"Enabled debug flags" | |||
) |
SYSCTL_UINT | ( | _kern_cam | , |
OID_AUTO | , | ||
xpt_generation | , | ||
CTLFLAG_RD | , | ||
&xsoftc. | xpt_generation, | ||
0 | , | ||
"CAM peripheral generation count" | |||
) |
SYSINIT | ( | xpt_hw_delay | , |
SI_SUB_INT_CONFIG_HOOKS | , | ||
SI_ORDER_ANY | , | ||
xpt_ch_done | , | ||
NULL | |||
) |
|
static |
Definition at line 4715 of file cam_xpt.c.
References cam_eb::refcount, xpt_lock_buses(), and xpt_unlock_buses().
Referenced by xpt_clone_path().
void xpt_acquire_device | ( | struct cam_ed * | device | ) |
Definition at line 4897 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_ed::refcount, and cam_ed::target.
Referenced by aprobedone(), mmcprobe_done(), nvme_probe_done(), pmpfreeze(), probedone(), xpt_action_default(), xpt_async_process_dev(), xpt_clone_path(), and xpt_scanner_thread().
|
static |
Definition at line 4783 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, and cam_et::refcount.
Referenced by xpt_clone_path().
void xpt_action | ( | union ccb * | start_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 * | start_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().
int32_t xpt_add_periph | ( | struct cam_periph * | periph | ) |
Definition at line 1014 of file cam_xpt.c.
References cam_et::bus, CAM_REQ_CMP, cam_path::device, cam_eb::eb_mtx, cam_ed::generation, cam_periph::path, cam_periph::periph_run_task, cam_ed::periphs, cam_ed::target, xpt_softc::xpt_generation, xpt_run_allocq_task(), and xsoftc.
Referenced by cam_periph_alloc().
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().
Definition at line 4840 of file cam_xpt.c.
References camq::array_size, cam_ed::asyncs, cam_ed::callout, cam_ccbq_init(), CAM_DEV_UNCONFIGURED, cam_devq_resize(), cam_init_pinfo(), CAM_REQ_CMP, cam_ed::ccbq, cam_ed::device_destroy_task, cam_ed::device_mtx, cam_sim::devq, cam_ed::devq_entry, cam_eb::eb_mtx, cam_ed::flags, cam_ed::generation, cam_et::generation, cam_ed::lun_id, cam_sim::max_dev_openings, cam_ed::periphs, cam_ed::refcount, cam_et::refcount, cam_devq::send_mtx, cam_devq::send_queue, cam_ed::sim, cam_eb::sim, cam_ed::tag_delay_count, cam_ed::tag_saved_openings, cam_ed::target, and xpt_destroy_device().
Referenced by ata_alloc_device(), mmc_alloc_device(), nvme_alloc_device(), scsi_alloc_device(), and xpt_alloc_device_default().
|
static |
Definition at line 4815 of file cam_xpt.c.
References cam_ed::lun_id, cam_ed::maxtags, cam_ed::mintags, cam_ed::target, and xpt_alloc_device().
|
static |
Definition at line 4744 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_et::generation, cam_eb::generation, cam_et::last_reset, cam_et::luns, cam_et::luns_mtx, cam_et::refcount, cam_eb::refcount, cam_et::target_id, and xsoftc.
Referenced by xpt_compile_path().
void xpt_announce_periph | ( | struct cam_periph * | periph, |
char * | announce_string | ||
) |
Definition at line 1049 of file cam_xpt.c.
References xpt_xport_ops::announce, cam_path::bus, cam_sim::bus_id, CAM_DEV_TAG_AFTER_COUNT, CAM_PERIPH_ANNOUNCED, cam_periph_assert, cam_path::device, cam_periph::flags, cam_ed::flags, cam_ed::inq_flags, cam_ed::lun_id, xpt_xport::ops, cam_periph::path, cam_eb::path_id, cam_path::periph, cam_periph::periph_name, xpt_proto::proto, cam_ed::protocol, cam_ed::serial_num, cam_ed::serial_num_len, SID_CmdQue, cam_eb::sim, cam_sim::sim_name, cam_path::target, cam_et::target_id, cam_periph::unit_number, cam_sim::unit_number, cam_eb::xport, and xpt_proto_find().
Referenced by chdone(), ndaregister(), passregister(), pmpregister(), ptctor(), sadone(), saregister(), sastart(), sdda_start_init(), sgregister(), xpt_announce_periph_sbuf(), and xptpassannouncefunc().
void xpt_announce_periph_sbuf | ( | struct cam_periph * | periph, |
struct sbuf * | sb, | ||
char * | announce_string | ||
) |
Definition at line 1093 of file cam_xpt.c.
References xpt_xport_ops::announce_sbuf, cam_path::bus, cam_sim::bus_id, CAM_DEV_TAG_AFTER_COUNT, CAM_PERIPH_ANNOUNCED, cam_periph_assert, cam_path::device, cam_periph::flags, cam_ed::flags, cam_ed::inq_flags, cam_ed::lun_id, xpt_xport::ops, cam_periph::path, cam_eb::path_id, cam_path::periph, cam_periph::periph_name, xpt_proto::proto, cam_ed::protocol, cam_ed::serial_num, cam_ed::serial_num_len, SID_CmdQue, cam_eb::sim, cam_sim::sim_name, cam_path::target, cam_et::target_id, cam_periph::unit_number, cam_sim::unit_number, cam_eb::xport, xpt_announce_periph(), xpt_proto_find(), and xsoftc.
Referenced by adaregister(), cddone(), dadone_proberc(), and enc_ctor().
void xpt_announce_quirks | ( | struct cam_periph * | periph, |
int | quirks, | ||
char * | bit_string | ||
) |
Definition at line 1151 of file cam_xpt.c.
References cam_periph::periph_name, and cam_periph::unit_number.
Referenced by chdone(), ndaregister(), sadone(), saregister(), sastart(), and xpt_announce_quirks_sbuf().
void xpt_announce_quirks_sbuf | ( | struct cam_periph * | periph, |
struct sbuf * | sb, | ||
int | quirks, | ||
char * | bit_string | ||
) |
Definition at line 1160 of file cam_xpt.c.
References cam_periph::periph_name, cam_periph::unit_number, xpt_announce_quirks(), and xsoftc.
Referenced by adaregister(), cddone(), and dadone_proberc().
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().
|
static |
Definition at line 4318 of file cam_xpt.c.
References async_node::callback, async_node::callback_arg, cam_path::device, async_node::event_enable, async_node::event_lock, cam_sim::mtx, and cam_ed::sim.
Referenced by xpt_async_process_dev().
|
static |
Definition at line 4276 of file cam_xpt.c.
References AC_BUS_RESET, ccb_async::async_arg_ptr, ccb_async::async_arg_size, ccb_async::async_code, cam_path::bus, CAM_DEBUG, CAM_DEBUG_INFO, CAM_DEBUG_TRACE, CAM_LUN_WILDCARD, ccb::casync, ccb::ccb_h, cam_path::device, cam_eb::last_reset, cam_ed::lun_id, ccb_hdr::path, cam_periph::path, cam_eb::sim, xpt_async_process_dev(), xpt_async_process_tgt(), xpt_async_string(), xpt_free_ccb(), xpt_free_path(), xpt_path_lock, xpt_path_unlock, xpt_periph, xpt_release_devq(), xpt_release_simq(), and xpttargettraverse().
Referenced by xpt_async().
|
static |
Definition at line 4207 of file cam_xpt.c.
References xpt_xport_ops::async, ccb_async::async_arg_ptr, ccb_async::async_code, cam_ed::asyncs, cam_et::bus, CAM_BUS_WILDCARD, CAM_LUN_WILDCARD, CAM_TARGET_WILDCARD, ccb::casync, ccb::ccb_h, cam_path::device, cam_ed::device_mtx, cam_ed::lun_id, xpt_xport::ops, ccb_hdr::path, cam_eb::path_id, cam_ed::target, cam_path::target, cam_et::target_id, cam_eb::xport, xpt_acquire_device(), xpt_async_bcast(), xpt_path_lock, xpt_path_unlock, and xpt_release_device().
Referenced by xpt_async_process(), and xpt_async_process_tgt().
|
static |
Definition at line 4257 of file cam_xpt.c.
References AC_SENT_BDR, ccb_async::async_code, CAM_TARGET_WILDCARD, ccb::casync, ccb::ccb_h, cam_et::last_reset, ccb_hdr::path, cam_path::target, cam_et::target_id, xpt_async_process_dev(), and xptdevicetraverse().
Referenced by xpt_async_process().
|
static |
Definition at line 4184 of file cam_xpt.c.
References AC_ADVINFO_CHANGED, AC_BUS_RESET, AC_CONTRACT, AC_FOUND_DEVICE, AC_GETDEV_CHANGED, AC_INQ_CHANGED, AC_LOST_DEVICE, AC_PATH_DEREGISTERED, AC_PATH_REGISTERED, AC_SCSI_AEN, AC_SENT_BDR, AC_TRANSFER_NEG, AC_UNIT_ATTENTION, and AC_UNSOL_RESEL.
Referenced by xpt_async().
|
static |
Definition at line 4161 of file cam_xpt.c.
References AC_ADVINFO_CHANGED, AC_BUS_RESET, AC_CONTRACT, AC_FOUND_DEVICE, AC_GETDEV_CHANGED, AC_INQ_CHANGED, AC_LOST_DEVICE, AC_PATH_DEREGISTERED, AC_PATH_REGISTERED, AC_SCSI_AEN, AC_SENT_BDR, AC_TRANSFER_NEG, AC_UNIT_ATTENTION, and AC_UNSOL_RESEL.
Referenced by xpt_async(), and xpt_async_process().
|
static |
Definition at line 5465 of file cam_xpt.c.
References cam_doneq::cam_doneq_mtx, ccb_hdr::sim_links, STAILQ_HEAD(), and xpt_done_process().
Referenced by xpt_init().
|
static |
Definition at line 5087 of file cam_xpt.c.
References xpt_release_boot().
Referenced by xpt_ch_done().
int xpt_bus_deregister | ( | path_id_t | pathid | ) |
Definition at line 4065 of file cam_xpt.c.
References AC_LOST_DEVICE, AC_PATH_DEREGISTERED, cam_path::bus, CAM_LUN_WILDCARD, CAM_REQ_CMP, CAM_SUCCESS, CAM_TARGET_WILDCARD, xpt_async(), xpt_compile_path(), xpt_release_bus(), and xpt_release_path().
Referenced by cfcs_init(), cfcs_shutdown(), and mmc_cam_sim_free().
int xpt_bus_register | ( | struct cam_sim * | sim, |
device_t | parent, | ||
uint32_t | bus | ||
) |
Definition at line 3965 of file cam_xpt.c.
References AC_PATH_REGISTERED, cam_path::bus, cam_sim::bus_id, CAM_LUN_WILDCARD, CAM_REQ_CMP, cam_sim_hold(), CAM_SUCCESS, CAM_TARGET_WILDCARD, CAM_XPT_PATH_ID, ccb_pathinq::ccb_h, ccb::ccb_h, ccb::crcn, cam_eb::eb_mtx, ccb_rescan::flags, cam_eb::flags, ccb_hdr::func_code, cam_eb::generation, ccb_pathinq::hba_misc, cam_eb::last_reset, cam_eb::parent_dev, ccb_hdr::path, cam_sim::path_id, cam_eb::path_id, PIM_NOSCAN, cam_eb::refcount, cam_eb::sim, cam_sim::sim_name, ccb_hdr::status, ccb_pathinq::transport, cam_sim::unit_number, cam_eb::xport, xport_default, xpt_alloc_ccb_nowait(), xpt_async(), xpt_create_path(), xpt_free_path(), xpt_lock_buses(), xpt_path_inq(), xpt_print(), xpt_release_bus(), xpt_rescan(), XPT_SCAN_BUS, xpt_unlock_buses(), xptpathid(), and xsoftc.
Referenced by cfcs_init(), mmc_cam_sim_alloc(), and xpt_init().
|
static |
Definition at line 5098 of file cam_xpt.c.
References xpt_boot_delay(), and xsoftc.
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().
|
static |
Definition at line 5111 of file cam_xpt.c.
References CAM_DEBUG_BUS, CAM_DEBUG_LUN, CAM_DEBUG_NONE, CAM_DEBUG_TARGET, cam_dflags, cam_dpath, cam_proc, CAM_REQ_CMP, periphdriver_init(), xpt_create_path(), xpt_hold_boot(), xpt_scanner_thread(), and xsoftc.
Referenced by xpt_init().
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 * | periph, | ||
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_denounce_periph | ( | struct cam_periph * | periph | ) |
Definition at line 1175 of file cam_xpt.c.
References cam_path::bus, cam_sim::bus_id, cam_periph_assert, cam_path::device, cam_ed::lun_id, cam_periph::path, cam_eb::path_id, cam_path::periph, cam_periph::periph_name, xpt_proto::proto, cam_ed::protocol, cam_ed::serial_num, cam_ed::serial_num_len, cam_eb::sim, cam_sim::sim_name, cam_path::target, cam_et::target_id, cam_periph::unit_number, cam_sim::unit_number, and xpt_proto_find().
Referenced by xpt_denounce_periph_sbuf().
void xpt_denounce_periph_sbuf | ( | struct cam_periph * | periph, |
struct sbuf * | sb | ||
) |
Definition at line 1203 of file cam_xpt.c.
References cam_path::bus, cam_sim::bus_id, cam_periph_assert, cam_path::device, cam_ed::lun_id, cam_periph::path, cam_eb::path_id, cam_path::periph, cam_periph::periph_name, xpt_proto::proto, cam_ed::protocol, cam_ed::serial_num, cam_ed::serial_num_len, cam_eb::sim, cam_sim::sim_name, cam_path::target, cam_et::target_id, cam_periph::unit_number, cam_sim::unit_number, xpt_denounce_periph(), xpt_proto_find(), and xsoftc.
Referenced by cam_periph_invalidate().
|
static |
Definition at line 4830 of file cam_xpt.c.
References cam_ed::device_mtx.
Referenced by xpt_alloc_device().
|
static |
Definition at line 4404 of file cam_xpt.c.
References CAM_LUN_WILDCARD, CAM_TARGET_WILDCARD, cam_ed::lun_id, and cam_et::target_id.
u_int32_t xpt_dev_ccbq_resize | ( | struct cam_path * | path, |
int | newopenings | ||
) |
Definition at line 4958 of file cam_xpt.c.
References cam_ccbq_resize(), CAM_DEV_TAG_AFTER_COUNT, cam_ed::ccbq, cam_path::device, cam_sim::devq, cam_ed::flags, cam_ed::inq_flags, cam_devq::send_mtx, SID_CmdQue, cam_ed::sim, and cam_ed::tag_saved_openings.
Referenced by xpt_action_default(), xpt_start_tags(), and xpt_stop_tags().
void xpt_done | ( | union ccb * | done_ccb | ) |
Definition at line 4562 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, CAM_DONEQ_INDEX, cam_doneq::cam_doneq_mtx, cam_doneqs, cam_iosched_delta_t(), cam_num_doneqs, CAM_QOS_VALID, ccb::ccb_h, ccb::csio, ccb_hdr::func_code, cam_pinfo::index, ccb_hdr::path, ccb_hdr::path_id, ccb_qos_area::periph_data, ccb_hdr::pinfo, ccb_hdr::qos, ccb_hdr::status, ccb_hdr::target_id, ccb_hdr::target_lun, xpt_action_name(), XPT_FC_QUEUED, and XPT_SCSI_IO.
Referenced by aprobedone(), ata_action(), ata_scan_bus(), ata_scan_lun(), ata_set_transfer_settings(), cfcs_action(), cfcs_datamove(), cfcs_done(), mmc_cam_sim_default_action(), mmc_scan_lun(), mmc_sim_task(), nvme_probe_done(), nvme_scan_lun(), probedone(), scsi_scan_bus(), scsi_scan_lun(), scsi_set_transfer_settings(), xpt_action_default(), and xptaction().
void xpt_done_direct | ( | union ccb * | done_ccb | ) |
Definition at line 4597 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, cam_iosched_delta_t(), CAM_QOS_VALID, ccb::ccb_h, ccb_hdr::func_code, ccb_hdr::path, ccb_qos_area::periph_data, ccb_hdr::qos, ccb_hdr::status, xpt_done_process(), and XPT_FC_QUEUED.
|
static |
Definition at line 5335 of file cam_xpt.c.
References cam_path::bus, cam_ccbq_ccb_done(), CAM_DEV_QFRZDIS, CAM_DEV_QFRZN, CAM_DEV_REL_ON_COMPLETE, CAM_DEV_REL_ON_QUEUE_EMPTY, CAM_DEV_TAG_AFTER_COUNT, CAM_HIGH_POWER, CAM_RELEASE_SIMQ, CAM_REQUEUE_REQ, CAM_STATUS_MASK, CAM_UNLOCKED, CAM_UNQUEUED_INDEX, ccb_hdr::cbfcnp, ccb_scsiio::ccb_h, ccb::ccb_h, cam_ed::ccbq, ccb::csio, cam_ccbq::dev_active, cam_path::device, device_is_queued(), cam_sim::devq, ccb_hdr::flags, cam_ed::flags, ccb_hdr::func_code, cam_pinfo::index, ccb_hdr::path, cam_path::periph, ccb_hdr::pinfo, cam_devq::send_active, cam_devq::send_mtx, cam_devq::send_openings, cam_ed::sim, cam_eb::sim, ccb_hdr::status, cam_ed::tag_delay_count, xpt_action_name(), XPT_FC_USER_CCB, xpt_softc::xpt_highpower_lock, xpt_path_mtx(), xpt_release_devq(), xpt_release_devq_device(), xpt_release_simq(), xpt_run_devq(), xpt_schedule_devq(), XPT_SCSI_IO, xpt_start_tags(), and xsoftc.
Referenced by camisr_runqueue(), xpt_async_td(), xpt_done_direct(), and xpt_done_td().
|
static |
Definition at line 5490 of file cam_xpt.c.
References cam_doneq::cam_doneq_mtx, ccb_hdr::sim_links, STAILQ_HEAD(), and xpt_done_process().
Referenced by xpt_init().
Definition at line 4974 of file cam_xpt.c.
References cam_eb::path_id, cam_eb::refcount, xpt_lock_buses(), xpt_unlock_buses(), and xsoftc.
Referenced by xpt_compile_path(), and xptdoioctl().
Definition at line 5009 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_ed::lun_id, cam_ed::refcount, and cam_ed::target.
Referenced by xpt_compile_path().
|
static |
Definition at line 4992 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_et::refcount, and cam_et::target_id.
Referenced by xpt_compile_path().
|
static |
Definition at line 5197 of file cam_xpt.c.
References periphdriver_init(), xpt_for_all_devices(), xpt_release_boot(), and xptpassannouncefunc.
Referenced by xpt_release_boot().
|
static |
Definition at line 2519 of file cam_xpt.c.
References xpt_traverse_config::depth, xpt_traverse_config::tr_arg, xpt_traverse_config::tr_func, XPT_DEPTH_BUS, xptbustraverse(), and xptdefbusfunc.
Referenced by xpt_register_async().
|
static |
Definition at line 2534 of file cam_xpt.c.
References xpt_traverse_config::depth, xpt_traverse_config::tr_arg, xpt_traverse_config::tr_func, XPT_DEPTH_DEVICE, xptbustraverse(), and xptdefbusfunc.
Referenced by xpt_finishconfig_task(), and xpt_register_async().
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().
u_int32_t xpt_freeze_devq | ( | struct cam_path * | path, |
u_int | count | ||
) |
Definition at line 4438 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, cam_path::device, cam_sim::devq, cam_devq::send_mtx, cam_ed::sim, and xpt_freeze_devq_device().
Referenced by cfcs_action(), cfcs_done(), xpt_action_default(), xpt_async(), xpt_run_devq(), xpt_start_tags(), and xpt_stop_tags().
|
static |
Definition at line 4420 of file cam_xpt.c.
References CAM_DEBUG_DEV, CAM_DEBUG_TRACE, camq_remove(), cam_ed::ccbq, device_is_queued(), cam_sim::devq, cam_ed::devq_entry, cam_pinfo::index, camq::qfrozen_cnt, cam_ccbq::queue, cam_devq::send_mtx, cam_devq::send_queue, and cam_ed::sim.
Referenced by xpt_action_default(), xpt_freeze_devq(), and xpt_run_devq().
u_int32_t xpt_freeze_simq | ( | struct cam_sim * | sim, |
u_int | count | ||
) |
Definition at line 4453 of file cam_xpt.c.
References cam_sim::devq, camq::qfrozen_cnt, cam_devq::send_mtx, and cam_devq::send_queue.
Referenced by xpt_async().
|
static |
Definition at line 4674 of file cam_xpt.c.
References ccb_hdr::alloc_flags, CAM_CCB_FROM_UMA, cam_ccbq_take_opening(), cam_periph_lock, cam_periph_unlock, ccb::ccb_h, cam_periph::ccb_zone, cam_ed::ccbq, cam_path::device, cam_periph::path, and cam_periph::periph_allocated.
Referenced by xpt_run_allocq().
|
static |
Definition at line 4653 of file cam_xpt.c.
References ccb_hdr::alloc_flags, CAM_CCB_FROM_UMA, cam_ccbq_take_opening(), ccb::ccb_h, cam_periph::ccb_zone, cam_ed::ccbq, cam_path::device, cam_periph::path, and cam_periph::periph_allocated.
Referenced by xpt_run_allocq().
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().
|
static |
Definition at line 5140 of file cam_xpt.c.
References xsoftc.
Referenced by xpt_hold_boot(), and xpt_rescan().
|
static |
Definition at line 889 of file cam_xpt.c.
References cam_async, cam_doneq::cam_doneq_mtx, cam_doneqs, CAM_LUN_WILDCARD, CAM_MAX_HIGHPOWER, cam_num_doneqs, cam_periph_alloc(), CAM_PERIPH_BIO, cam_proc, CAM_REQ_CMP, cam_sim_alloc(), cam_simq_alloc(), CAM_SUCCESS, CAM_TARGET_WILDCARD, CAM_XPT_PATH_ID, xpt_async_td(), xpt_bus_register(), xpt_config(), xpt_create_path(), xpt_done_td(), xpt_free_path(), xpt_softc::xpt_highpower_lock, xpt_path_lock, xpt_path_unlock, xptaction(), xptpoll(), xptregister(), and xsoftc.
Referenced by cam_module_event_handler().
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().
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().
Definition at line 773 of file cam_xpt.c.
References xpt_proto::proto.
Referenced by xpt_announce_periph(), xpt_announce_periph_sbuf(), xpt_denounce_periph(), xpt_denounce_periph_sbuf(), and xpt_run_devq().
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().
|
static |
Definition at line 4724 of file cam_xpt.c.
References cam_sim_release(), cam_eb::eb_mtx, cam_eb::refcount, cam_eb::sim, xpt_lock_buses(), xpt_unlock_buses(), and xsoftc.
Referenced by xpt_bus_deregister(), xpt_bus_register(), xpt_compile_path(), xpt_release_path(), xpt_release_target(), xptbustraverse(), and xptdoioctl().
void xpt_release_ccb | ( | union ccb * | free_ccb | ) |
Definition at line 3924 of file cam_xpt.c.
References cam_ccbq_release_opening(), CAM_DEBUG_PRINT, CAM_DEBUG_XPT, ccb::ccb_h, cam_ed::ccbq, cam_path::device, ccb_hdr::path, cam_path::periph, cam_periph::periph_allocated, xpt_free_ccb(), xpt_path_assert, and xpt_run_allocq().
Referenced by adaclose(), adadone(), adaflush(), adaprobedone(), adastart(), aprobedone(), cam_periph_ioctl(), cddone(), cdgetmode(), cdpause(), cdplay(), cdplaymsf(), cdplaytracks(), cdprevent(), cdreaddvdstructure(), cdreadsubchannel(), cdreadtoc(), cdreportkey(), cdsendkey(), cdsetmode(), cdsetspeed(), cdstart(), cdstartunit(), cdstopunit(), chdone(), chexchange(), chgetelemstatus(), chgetparams(), chielem(), chmove(), chposition(), chsetvoltag(), chstart(), ctlfedone(), ctlfestart(), daclose(), dadone(), dadone_probeata(), dadone_probeataiddir(), dadone_probeatalogdir(), dadone_probeatasup(), dadone_probebdc(), dadone_probeblklimits(), dadone_probelbp(), dadone_proberc(), dadone_probewp(), dadone_tur(), daprevent(), daprobedone(), dashutdown(), dastart(), enc_fsm_step(), enc_runcmd(), mmcprobe_done(), ndaclose(), ndadone(), ndaflush(), ndaioctl(), ndastart(), nvme_probe_done(), passdoioctl(), passdone(), passstart(), pmpdone(), probedone(), ptdone(), ptstart(), sadone(), saerase(), sagetparams(), sagetpos(), saloadunload(), samount(), saprevent(), sardpos(), sareservereleaseunit(), saretension(), sarewind(), sasetparams(), sasetpos(), sasetprot(), saspace(), sastart(), sawritefilemarks(), sddadone(), sddastart(), ses_set_timed_completion(), sgioctl(), targbhdone(), targbhstart(), targfreeccb(), targstart(), and xpt_run_allocq().
void xpt_release_device | ( | struct cam_ed * | device | ) |
Definition at line 4907 of file cam_xpt.c.
References camq::array_size, cam_et::bus, cam_ed::callout, cam_ccbq_fini(), CAM_DEV_REL_TIMEOUT_PENDING, cam_devq_resize(), CAM_UNQUEUED_INDEX, cam_ed::ccbq, cam_ed::device_destroy_task, cam_ed::device_id, cam_sim::devq, cam_ed::devq_entry, cam_eb::eb_mtx, cam_ed::ext_inq, cam_ed::flags, cam_et::generation, cam_pinfo::index, cam_ed::nvme_cdata, cam_ed::nvme_data, cam_ed::periphs, cam_ed::physpath, cam_ed::rcap_buf, cam_ed::refcount, cam_devq::send_mtx, cam_devq::send_queue, cam_ed::serial_num, cam_eb::sim, cam_ed::supported_vpds, cam_ed::target, xpt_release_target(), and xsoftc.
Referenced by ata_dev_async(), mmc_dev_async(), nvme_dev_async(), pmprelease(), scsi_dev_async(), xpt_action_default(), xpt_async_process_dev(), xpt_compile_path(), xpt_release_path(), xpt_scanner_thread(), and xptdevicetraverse().
void xpt_release_devq | ( | struct cam_path * | path, |
u_int | count, | ||
int | run_queue | ||
) |
Definition at line 4480 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, cam_path::device, cam_sim::devq, cam_devq::send_mtx, cam_ed::sim, xpt_release_devq_device(), and xpt_run_devq().
Referenced by aprobedone(), nvme_probe_done(), probedone(), xpt_action_default(), xpt_async_process(), and xpt_done_process().
|
static |
Definition at line 4496 of file cam_xpt.c.
References cam_ed::callout, CAM_DEBUG_DEV, CAM_DEBUG_TRACE, CAM_DEV_REL_TIMEOUT_PENDING, cam_ed::ccbq, cam_sim::devq, cam_ed::flags, camq::qfrozen_cnt, cam_ccbq::queue, cam_devq::send_mtx, cam_ed::sim, and xpt_schedule_devq().
Referenced by xpt_done_process(), xpt_release_devq(), and xpt_release_devq_timeout().
|
static |
Definition at line 4466 of file cam_xpt.c.
References CAM_DEBUG_DEV, CAM_DEBUG_TRACE, cam_sim::devq, cam_devq::send_mtx, cam_ed::sim, xpt_release_devq_device(), and xpt_run_devq().
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_release_simq | ( | struct cam_sim * | sim, |
int | run_queue | ||
) |
Definition at line 4537 of file cam_xpt.c.
References cam_sim::devq, camq::qfrozen_cnt, cam_devq::send_mtx, cam_devq::send_queue, and xpt_run_devq().
Referenced by xpt_async_process(), and xpt_done_process().
|
static |
Definition at line 4793 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_eb::generation, cam_et::luns, cam_et::luns_mtx, cam_et::refcount, and xpt_release_bus().
Referenced by xpt_compile_path(), xpt_release_device(), xpt_release_path(), and xpttargettraverse().
void xpt_remove_periph | ( | struct cam_periph * | periph | ) |
Definition at line 1034 of file cam_xpt.c.
References cam_et::bus, cam_path::device, cam_eb::eb_mtx, cam_ed::generation, cam_periph::path, cam_ed::periphs, cam_ed::target, xpt_softc::xpt_generation, and xsoftc.
Referenced by cam_periph_alloc(), and camperiphfree().
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().
|
static |
Definition at line 786 of file cam_xpt.c.
References ccb_hdr::cbfcnp, ccb::ccb_h, ccb_hdr::path, xpt_free_ccb(), xpt_free_path(), and xpt_release_boot().
Referenced by xpt_rescan().
|
static |
Definition at line 3314 of file cam_xpt.c.
References CAM_DEBUG_PRINT, CAM_DEBUG_XPT, cam_periph_assert, cam_periph_doacquire(), cam_periph_release_locked(), CAM_PERIPH_RUN_TASK, CAM_PRIORITY_NONE, CAM_PRIORITY_OOB, ccb, ccb::ccb_h, cam_ed::ccbq, cam_path::device, cam_periph::flags, cam_periph::immediate_priority, cam_periph::path, cam_periph::periph_allocated, cam_periph::periph_allocating, cam_periph::periph_run_task, cam_periph::periph_start, cam_periph::scheduled_priority, cam_ccbq::total_openings, xpt_get_ccb(), xpt_get_ccb_nowait(), xpt_release_ccb(), xpt_setup_ccb(), and xsoftc.
Referenced by cam_periph_getccb(), xpt_release_ccb(), xpt_run_allocq_task(), and xpt_schedule().
|
static |
Definition at line 3302 of file cam_xpt.c.
References cam_periph_lock, cam_periph_release(), cam_periph_unlock, cam_periph::flags, and xpt_run_allocq().
Referenced by xpt_add_periph().
|
static |
Definition at line 3370 of file cam_xpt.c.
References cam_ccbq_peek_ccb(), cam_ccbq_remove_ccb(), cam_ccbq_send_ccb(), CAM_DEBUG_PRINT, CAM_DEBUG_XPT, CAM_DEV_QFREEZE, CAM_HIGH_POWER, cam_iosched_now(), CAM_TAG_ACTION_NONE, CAM_TAG_ACTION_VALID, CAMQ_HEAD, camq_remove(), ccb::ccb_h, cam_ed::ccbq, ccb::csio, xpt_proto_ops::debug_out, cam_path::device, camq::entries, ccb_hdr::flags, ccb_hdr::func_code, cam_ed::inq_flags, cam_sim::mtx, xpt_proto::ops, ccb_hdr::path, ccb_qos_area::periph_data, xpt_proto::proto, cam_ed::protocol, camq::qfrozen_cnt, ccb_hdr::qos, cam_devq::send_active, cam_devq::send_mtx, cam_devq::send_openings, cam_devq::send_queue, SID_CmdQue, cam_ed::sim, cam_sim::sim_action, ccb_scsiio::tag_action, xpt_freeze_devq(), xpt_freeze_devq_device(), xpt_softc::xpt_highpower_lock, xpt_proto_find(), xpt_schedule_devq(), XPT_SCSI_IO, and xsoftc.
Referenced by xpt_action_default(), xpt_done_process(), xpt_release_devq(), xpt_release_devq_timeout(), and xpt_release_simq().
|
static |
Definition at line 801 of file cam_xpt.c.
References ccb, ccb::ccb_h, cam_path::device, ccb_hdr::path, xpt_acquire_device(), xpt_action(), xpt_lock_buses(), xpt_path_mtx(), xpt_release_device(), xpt_unlock_buses(), and xsoftc.
Referenced by xpt_config().
void xpt_schedule | ( | struct cam_periph * | periph, |
u_int32_t | new_priority | ||
) |
Definition at line 3243 of file cam_xpt.c.
References CAM_DEBUG, CAM_DEBUG_TRACE, cam_periph_assert, cam_periph::path, cam_periph::scheduled_priority, and xpt_run_allocq().
Referenced by adaasync(), adadone(), adaregister(), aprobedone(), aprobeschedule(), cam_iosched_schedule(), cdasync(), cdcheckmedia(), cddone(), cdmediapoll(), cdregister(), cdstart(), cdstrategy(), chregister(), ctlfe_datamove(), ctlfe_done(), ctlfedone(), ctlfestart(), dadone_probeata(), dadone_probeataiddir(), dadone_probeatalogdir(), dadone_probeatasup(), dadone_probebdc(), dadone_probeblklimits(), dadone_probelbp(), dadone_proberc(), dadone_probewp(), daregister(), dareprobe(), mmcprobe_done(), mmcprobe_register(), nvme_probe_done(), nvme_probe_schedule(), passdoioctl(), passstart(), pmpasync(), pmpdone(), pmpregister(), probedone(), probeschedule(), ptstart(), ptstrategy(), saregister(), sastart(), sastrategy(), sddadone(), sddaregister(), sddaschedule(), targbhdone(), targbhstart(), targstart(), and targwrite().
|
static |
Definition at line 3263 of file cam_xpt.c.
References CAM_DEBUG_PRINT, CAM_DEBUG_XPT, CAM_UNQUEUED_INDEX, camq_change_priority(), camq_insert(), cam_pinfo::generation, camq::generation, cam_pinfo::index, and cam_pinfo::priority.
Referenced by xpt_schedule_devq().
Definition at line 328 of file cam_xpt.c.
References CAMQ_GET_PRIO, cam_ed::ccbq, cam_ccbq::dev_openings, cam_ed::devq_entry, camq::entries, camq::qfrozen_cnt, cam_ccbq::queue, cam_devq::send_mtx, cam_devq::send_queue, and xpt_schedule_dev().
Referenced by xpt_action_default(), xpt_done_process(), xpt_release_devq_device(), and xpt_run_devq().
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_start_tags | ( | struct cam_path * | path | ) |
Definition at line 5026 of file cam_xpt.c.
References AC_GETDEV_CHANGED, cam_path::bus, CAM_PRIORITY_NORMAL, ccb_relsim::ccb_h, cam_path::device, cam_ed::flags, ccb_hdr::func_code, cam_ed::inq_flags, cam_sim::max_tagged_dev_openings, cam_ed::maxtags, ccb_relsim::openings, ccb_relsim::qfrozen_cnt, ccb_relsim::release_flags, ccb_relsim::release_timeout, RELSIM_RELEASE_AFTER_QEMPTY, SID_CmdQue, cam_eb::sim, cam_ed::tag_saved_openings, xpt_action(), xpt_async(), xpt_dev_ccbq_resize(), xpt_freeze_devq(), XPT_REL_SIMQ, and xpt_setup_ccb().
Referenced by xpt_done_process().
void xpt_stop_tags | ( | struct cam_path * | path | ) |
Definition at line 5057 of file cam_xpt.c.
References AC_GETDEV_CHANGED, cam_path::bus, CAM_PRIORITY_NORMAL, ccb_relsim::ccb_h, cam_path::device, cam_ed::flags, ccb_hdr::func_code, cam_ed::inq_flags, cam_sim::max_dev_openings, ccb_relsim::openings, ccb_relsim::qfrozen_cnt, ccb_relsim::release_flags, ccb_relsim::release_timeout, RELSIM_RELEASE_AFTER_QEMPTY, cam_eb::sim, cam_ed::tag_delay_count, xpt_action(), xpt_async(), xpt_dev_ccbq_resize(), xpt_freeze_devq(), XPT_REL_SIMQ, and xpt_setup_ccb().
Referenced by ata_set_transfer_settings(), and scsi_set_transfer_settings().
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().
Definition at line 5267 of file cam_xpt.c.
References ccb_pathinq::base_transfer_speed, ccb_pathinq::bus_id, cam_sim::bus_id, CAM_DEBUG, CAM_DEBUG_TRACE, CAM_REQ_CMP, CAM_REQ_INVALID, ccb_pathinq::ccb_h, ccb::ccb_h, ccb::cpi, DEV_IDLEN, ccb_pathinq::dev_name, ccb_hdr::func_code, ccb_pathinq::hba_eng_cnt, HBA_IDLEN, ccb_pathinq::hba_inquiry, ccb_pathinq::hba_misc, ccb_pathinq::hba_vid, ccb_pathinq::initiator_id, ccb_pathinq::max_lun, ccb_pathinq::max_target, ccb_hdr::path, PROTO_UNSPECIFIED, PROTO_VERSION_UNSPECIFIED, ccb_pathinq::protocol, ccb_pathinq::protocol_version, SIM_IDLEN, cam_sim::sim_name, ccb_pathinq::sim_vid, ccb_hdr::status, ccb_pathinq::target_sprt, ccb_pathinq::transport, ccb_pathinq::transport_version, ccb_pathinq::unit_number, cam_sim::unit_number, ccb_pathinq::version_num, XPORT_UNSPECIFIED, XPORT_VERSION_UNSPECIFIED, xpt_done(), and XPT_PATH_INQ.
Referenced by xpt_init().
|
static |
Definition at line 1366 of file cam_xpt.c.
References bus_match_pattern::bus_id, cam_sim::bus_id, BUS_MATCH_BUS_ID, BUS_MATCH_NAME, BUS_MATCH_PATH, BUS_MATCH_UNIT, match_pattern::bus_pattern, DEV_IDLEN, DEV_MATCH_BUS, DEV_MATCH_DEVICE, DEV_MATCH_PATH, DEV_MATCH_PERIPH, bus_match_pattern::dev_name, match_pattern::device_pattern, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_DESCEND, DM_RET_ERROR, DM_RET_NONE, DM_RET_STOP, periph_match_pattern::flags, device_match_pattern::flags, bus_match_pattern::flags, periph_match_pattern::path_id, device_match_pattern::path_id, bus_match_pattern::path_id, cam_eb::path_id, dev_match_pattern::pattern, PERIPH_MATCH_PATH, match_pattern::periph_pattern, cam_eb::sim, cam_sim::sim_name, bus_match_pattern::unit_number, and cam_sim::unit_number.
Referenced by xptedtbusfunc().
|
static |
Definition at line 2214 of file cam_xpt.c.
References cam_eb::refcount, xpt_lock_buses(), xpt_release_bus(), xpt_unlock_buses(), and xsoftc.
Referenced by xpt_for_all_busses(), xpt_for_all_devices(), and xptedtmatch().
|
static |
|
static |
Definition at line 2447 of file cam_xpt.c.
References xpt_traverse_config::depth, xpt_traverse_config::tr_arg, xpt_traverse_config::tr_func, XPT_DEPTH_BUS, xptdeftargetfunc, and xpttargettraverse().
|
static |
Definition at line 2481 of file cam_xpt.c.
References xpt_traverse_config::depth, xpt_traverse_config::tr_arg, xpt_traverse_config::tr_func, XPT_DEPTH_DEVICE, xptdefperiphfunc, and xptperiphtraverse().
|
static |
Definition at line 2498 of file cam_xpt.c.
References xpt_traverse_config::tr_arg, and xpt_traverse_config::tr_func.
|
static |
Definition at line 2464 of file cam_xpt.c.
References xpt_traverse_config::depth, xpt_traverse_config::tr_arg, xpt_traverse_config::tr_func, XPT_DEPTH_TARGET, xptdefdevicefunc, and xptdevicetraverse().
|
static |
Definition at line 1466 of file cam_xpt.c.
References cam_et::bus, cam_quirkmatch(), device_match_pattern::data, scsi_vpd_device_id::desc_list, DEV_MATCH_DEVICE, DEV_MATCH_DEVID, DEV_MATCH_INQUIRY, DEV_MATCH_LUN, DEV_MATCH_PATH, DEV_MATCH_PERIPH, DEV_MATCH_TARGET, scsi_vpd_device_id::device, match_pattern::device_pattern, device_match_pattern::devid_pat, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_DESCEND, DM_RET_ERROR, DM_RET_NONE, DM_RET_STOP, periph_match_pattern::flags, device_match_pattern::flags, device_id_match_pattern::id, device_id_match_pattern::id_len, cam_ed::inq_data, device_match_pattern::inq_pat, cam_ed::lun_id, device_match_pattern::path_id, cam_eb::path_id, dev_match_pattern::pattern, PERIPH_MATCH_LUN, PERIPH_MATCH_TARGET, match_pattern::periph_pattern, scsi_devid_match(), scsi_static_inquiry_match(), SVPD_DEVICE_ID_HDR_LEN, cam_ed::target, periph_match_pattern::target_id, device_match_pattern::target_id, cam_et::target_id, periph_match_pattern::target_lun, and device_match_pattern::target_lun.
Referenced by xptedtdevicefunc().
|
static |
Definition at line 2285 of file cam_xpt.c.
References cam_et::bus, cam_ed::device_mtx, cam_eb::eb_mtx, cam_ed::refcount, cam_ed::target, and xpt_release_device().
Referenced by xpt_async_process_tgt(), xptdeftargetfunc(), and xptedttargetfunc().
|
static |
Definition at line 409 of file cam_xpt.c.
References cam_path::bus, CAM_DATA_MASK, CAM_DATA_VADDR, CAM_GDEVLIST_ERROR, CAM_GDEVLIST_LAST_DEVICE, CAM_GDEVLIST_MORE_DEVS, CAM_LUN_WILDCARD, cam_periph_mapmem(), cam_periph_runccb(), cam_periph_unmapmem(), CAM_REQ_CMP, CAM_REQ_CMP_ERR, CAM_TARGET_WILDCARD, CAM_UNLOCKED, CAMGETPASSTHRU, CAMIOCOMMAND, ccb, ccb::ccb_h, ccb::cgdl, ccb::csio, cam_path::device, ccb_hdr::flags, ccb_hdr::func_code, ccb_getdevlist::generation, cam_ed::generation, ccb_getdevlist::index, cam_ed::lun_id, ccb_hdr::path, cam_periph::path, ccb_hdr::path_id, cam_eb::path_id, periph_drivers, ccb_getdevlist::periph_name, cam_periph::periph_name, cam_ed::periphs, ccb_hdr::pinfo, cam_pinfo::priority, ccb_hdr::status, ccb_getdevlist::status, cam_path::target, ccb_hdr::target_id, cam_et::target_id, ccb_hdr::target_lun, ccb_getdevlist::unit_number, cam_periph::unit_number, xpt_action(), xpt_alloc_ccb(), xpt_create_path(), XPT_DEBUG, XPT_DEV_MATCH, XPT_ENG_INQ, xpt_find_bus(), xpt_free_ccb(), xpt_free_path(), xpt_lock_buses(), xpt_merge_ccb(), XPT_PATH_INQ, xpt_path_lock, xpt_path_unlock, xpt_periph, xpt_release_bus(), XPT_RESET_BUS, XPT_SCAN_BUS, XPT_SCAN_LUN, XPT_SCAN_TGT, XPT_SCSI_IO, xpt_setup_ccb(), and xpt_unlock_buses().
|
static |
Definition at line 1671 of file cam_xpt.c.
References ccb_dm_cookie::bus, cam_et::bus, bus_match_result::bus_id, cam_sim::bus_id, match_result::bus_result, CAM_BUS_GENERATION, CAM_DEV_MATCH_ERROR, CAM_DEV_MATCH_LIST_CHANGED, CAM_DEV_MATCH_MORE, CAM_DEV_POS_BUS, CAM_DEV_POS_EDT, CAM_DEV_POS_TARGET, CAM_TARGET_GENERATION, ccb_dev_position::cookie, DEV_MATCH_BUS, bus_match_result::dev_name, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_DESCEND, DM_RET_ERROR, DM_RET_STOP, cam_eb::eb_mtx, cam_eb::generation, ccb_dev_position::generations, ccb_dev_match::match_buf_len, ccb_dev_match::matches, ccb_dev_match::num_matches, ccb_dev_match::num_patterns, bus_match_result::path_id, cam_eb::path_id, ccb_dev_match::patterns, ccb_dev_match::pos, ccb_dev_position::position_type, cam_et::refcount, dev_match_result::result, cam_eb::sim, cam_sim::sim_name, ccb_dev_match::status, ccb_dm_cookie::target, dev_match_result::type, bus_match_result::unit_number, cam_sim::unit_number, xptbusmatch(), xptedttargetfunc, xpttargettraverse(), and xsoftc.
|
static |
Definition at line 1804 of file cam_xpt.c.
References ccb_dm_cookie::bus, cam_et::bus, CAM_BUS_GENERATION, CAM_DEV_GENERATION, CAM_DEV_MATCH_ERROR, CAM_DEV_MATCH_LIST_CHANGED, CAM_DEV_MATCH_MORE, CAM_DEV_POS_BUS, CAM_DEV_POS_DEVICE, CAM_DEV_POS_EDT, CAM_DEV_POS_PERIPH, CAM_DEV_POS_TARGET, CAM_DEV_UNCONFIGURED, CAM_PERIPH_GENERATION, CAM_TARGET_GENERATION, ccb_dev_position::cookie, DEV_MATCH_DEVICE, DEV_RESULT_NOFLAG, DEV_RESULT_UNCONFIGURED, ccb_dm_cookie::device, match_result::device_result, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_DESCEND, DM_RET_ERROR, DM_RET_STOP, cam_eb::eb_mtx, device_match_result::flags, cam_ed::flags, cam_ed::generation, cam_et::generation, cam_eb::generation, ccb_dev_position::generations, device_match_result::ident_data, cam_ed::ident_data, device_match_result::inq_data, cam_ed::inq_data, cam_ed::lun_id, ccb_dev_match::match_buf_len, ccb_dev_match::matches, ccb_dev_match::num_matches, ccb_dev_match::num_patterns, device_match_result::path_id, cam_eb::path_id, ccb_dev_match::patterns, ccb_dm_cookie::periph, ccb_dev_match::pos, ccb_dev_position::position_type, device_match_result::protocol, cam_ed::protocol, cam_periph::refcount, dev_match_result::result, ccb_dev_match::status, ccb_dm_cookie::target, cam_ed::target, device_match_result::target_id, cam_et::target_id, device_match_result::target_lun, dev_match_result::type, xpt_lock_buses(), xpt_unlock_buses(), xptdevicematch(), xptedtperiphfunc, xptperiphtraverse(), and xsoftc.
|
static |
Definition at line 2002 of file cam_xpt.c.
References ccb_dm_cookie::bus, CAM_BUS_GENERATION, CAM_DEV_MATCH_LAST, CAM_DEV_MATCH_LIST_CHANGED, CAM_DEV_POS_BUS, ccb_dev_position::cookie, ccb_dev_position::generations, ccb_dev_match::num_matches, ccb_dev_match::pos, ccb_dev_position::position_type, cam_eb::refcount, ccb_dev_match::status, xpt_lock_buses(), xpt_unlock_buses(), xptbustraverse(), xptedtbusfunc, and xsoftc.
Referenced by xpt_action_default().
|
static |
Definition at line 1930 of file cam_xpt.c.
References ccb_dm_cookie::bus, cam_path::bus, CAM_BUS_GENERATION, CAM_DEV_GENERATION, CAM_DEV_MATCH_ERROR, CAM_DEV_MATCH_MORE, CAM_DEV_POS_BUS, CAM_DEV_POS_DEVICE, CAM_DEV_POS_EDT, CAM_DEV_POS_PERIPH, CAM_DEV_POS_TARGET, CAM_PERIPH_GENERATION, CAM_TARGET_GENERATION, ccb_dev_position::cookie, DEV_MATCH_PERIPH, ccb_dm_cookie::device, cam_path::device, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_ERROR, cam_ed::generation, cam_et::generation, cam_eb::generation, ccb_dev_position::generations, cam_ed::lun_id, ccb_dev_match::match_buf_len, ccb_dev_match::matches, ccb_dev_match::num_matches, ccb_dev_match::num_patterns, cam_periph::path, periph_match_result::path_id, cam_eb::path_id, ccb_dev_match::patterns, ccb_dm_cookie::periph, periph_match_result::periph_name, cam_periph::periph_name, match_result::periph_result, ccb_dev_match::pos, ccb_dev_position::position_type, dev_match_result::result, ccb_dev_match::status, ccb_dm_cookie::target, cam_path::target, periph_match_result::target_id, cam_et::target_id, periph_match_result::target_lun, dev_match_result::type, periph_match_result::unit_number, cam_periph::unit_number, xptperiphmatch(), and xsoftc.
|
static |
Definition at line 1768 of file cam_xpt.c.
References ccb_dm_cookie::bus, cam_et::bus, CAM_DEV_GENERATION, CAM_DEV_MATCH_LIST_CHANGED, CAM_DEV_POS_BUS, CAM_DEV_POS_DEVICE, CAM_DEV_POS_TARGET, ccb_dev_position::cookie, ccb_dm_cookie::device, cam_eb::eb_mtx, cam_et::generation, ccb_dev_position::generations, ccb_dev_match::pos, ccb_dev_position::position_type, cam_ed::refcount, ccb_dev_match::status, ccb_dm_cookie::target, cam_ed::target, xptdevicetraverse(), and xptedtdevicefunc.
|
static |
Definition at line 398 of file cam_xpt.c.
References cam_compat_ioctl(), and xptdoioctl.
|
static |
Definition at line 4086 of file cam_xpt.c.
References cam_eb::path_id, and xsoftc.
Referenced by xptpathid().
|
static |
Definition at line 364 of file cam_xpt.c.
References cam_ed::flags.
|
static |
Definition at line 5180 of file cam_xpt.c.
References cam_periph::periph_name, cam_ed::periphs, and xpt_announce_periph().
|
static |
Definition at line 4116 of file cam_xpt.c.
References CAM_XPT_PATH_ID, and xptnextfreepathid().
Referenced by xpt_bus_register().
|
static |
Definition at line 2402 of file cam_xpt.c.
References CAM_PERIPH_FREE, cam_periph_lock, cam_periph_release(), cam_periph_unlock, cam_periph::flags, cam_periph::refcount, xpt_lock_buses(), and xpt_unlock_buses().
Referenced by xptplistpdrvfunc().
|
static |
Definition at line 2374 of file cam_xpt.c.
References periph_drivers.
Referenced by xptperiphlistmatch().
|
static |
Definition at line 2176 of file cam_xpt.c.
References CAM_DEV_MATCH_LAST, CAM_DEV_POS_PDPTR, ccb_dev_position::cookie, ccb_dev_match::num_matches, ccb_dm_cookie::pdrv, ccb_dev_match::pos, ccb_dev_position::position_type, ccb_dev_match::status, xptpdrvtraverse(), and xptplistpdrvfunc.
Referenced by xpt_action_default().
|
static |
Definition at line 1584 of file cam_xpt.c.
References cam_path::bus, DEV_IDLEN, DEV_MATCH_PERIPH, cam_path::device, DM_RET_COPY, DM_RET_ERROR, DM_RET_STOP, periph_match_pattern::flags, cam_ed::lun_id, cam_periph::path, periph_match_pattern::path_id, cam_eb::path_id, dev_match_pattern::pattern, PERIPH_MATCH_LUN, PERIPH_MATCH_NAME, PERIPH_MATCH_PATH, PERIPH_MATCH_TARGET, PERIPH_MATCH_UNIT, periph_match_pattern::periph_name, cam_periph::periph_name, match_pattern::periph_pattern, cam_path::target, periph_match_pattern::target_id, cam_et::target_id, periph_match_pattern::target_lun, periph_match_pattern::unit_number, and cam_periph::unit_number.
Referenced by xptedtperiphfunc(), and xptplistperiphfunc().
|
static |
Definition at line 2325 of file cam_xpt.c.
References cam_et::bus, CAM_PERIPH_FREE, cam_periph_release_locked(), cam_eb::eb_mtx, cam_periph::flags, cam_ed::periphs, cam_periph::refcount, cam_ed::target, xpt_lock_buses(), and xpt_unlock_buses().
Referenced by xptdefdevicefunc(), and xptedtdevicefunc().
|
static |
Definition at line 2043 of file cam_xpt.c.
References CAM_DEV_MATCH_LIST_CHANGED, CAM_DEV_POS_PDPTR, CAM_DEV_POS_PERIPH, CAM_PERIPH_GENERATION, ccb_dev_position::cookie, ccb_dev_position::generations, ccb_dm_cookie::pdrv, ccb_dm_cookie::periph, ccb_dev_match::pos, ccb_dev_position::position_type, cam_periph::refcount, ccb_dev_match::status, xpt_lock_buses(), xpt_unlock_buses(), xptpdperiphtraverse(), and xptplistperiphfunc.
|
static |
Definition at line 2071 of file cam_xpt.c.
References cam_path::bus, CAM_DEV_MATCH_ERROR, CAM_DEV_MATCH_MORE, CAM_DEV_POS_PDPTR, CAM_DEV_POS_PDRV, CAM_DEV_POS_PERIPH, CAM_LUN_WILDCARD, CAM_PERIPH_GENERATION, CAM_TARGET_WILDCARD, ccb_dev_position::cookie, DEV_MATCH_PERIPH, cam_path::device, DM_RET_ACTION_MASK, DM_RET_COPY, DM_RET_ERROR, ccb_dev_position::generations, cam_ed::lun_id, ccb_dev_match::match_buf_len, ccb_dev_match::matches, ccb_dev_match::num_matches, ccb_dev_match::num_patterns, cam_periph::path, periph_match_result::path_id, cam_eb::path_id, ccb_dev_match::patterns, ccb_dm_cookie::pdrv, ccb_dm_cookie::periph, periph_drivers, periph_match_result::periph_name, cam_periph::periph_name, match_result::periph_result, ccb_dev_match::pos, ccb_dev_position::position_type, dev_match_result::result, ccb_dev_match::status, cam_path::target, periph_match_result::target_id, cam_et::target_id, periph_match_result::target_lun, dev_match_result::type, periph_match_result::unit_number, cam_periph::unit_number, and xptperiphmatch().
|
static |
Definition at line 5311 of file cam_xpt.c.
Referenced by xpt_init().
|
static |
Definition at line 996 of file cam_xpt.c.
References CAM_REQ_CMP, CAM_REQ_CMP_ERR, cam_periph::softc, cam_sim::softc, and xpt_periph.
Referenced by xpt_init().
|
static |
Definition at line 2579 of file cam_xpt.c.
References AC_PATH_REGISTERED, ccb_setasync::callback, ccb_setasync::callback_arg, CAM_LUN_WILDCARD, CAM_TARGET_WILDCARD, cam_eb::path_id, xpt_compile_path(), xpt_path_inq(), xpt_path_lock, xpt_path_unlock, and xpt_release_path().
|
static |
Definition at line 2546 of file cam_xpt.c.
References AC_FOUND_DEVICE, cam_et::bus, ccb_setasync::callback, ccb_setasync::callback_arg, CAM_DEV_UNCONFIGURED, CAM_PRIORITY_NORMAL, ccb_getdev::ccb_h, cam_ed::flags, ccb_hdr::func_code, cam_ed::lun_id, cam_eb::path_id, cam_ed::target, cam_et::target_id, xpt_action(), xpt_compile_path(), XPT_GDEV_TYPE, xpt_release_path(), and xpt_setup_ccb().
|
static |
Definition at line 2249 of file cam_xpt.c.
References cam_et::bus, cam_eb::eb_mtx, cam_et::refcount, and xpt_release_target().
Referenced by xpt_async_process(), xptdefbusfunc(), and xptedtbusfunc().
|
static |
Definition at line 183 of file cam_xpt.c.
Referenced by xpt_action_default(), and xpt_init().
u_int32_t cam_debug_delay = CAM_DEBUG_DELAY |
u_int32_t __read_mostly cam_dflags = CAM_DEBUG_FLAGS |
Definition at line 217 of file cam_xpt.c.
Referenced by xpt_action_default(), and xpt_config().
|
static |
Definition at line 180 of file cam_xpt.c.
Referenced by camisr_runqueue(), xpt_done(), and xpt_init().
struct cam_path* cam_dpath |
Definition at line 216 of file cam_xpt.c.
Referenced by xpt_action_default(), and xpt_config().
|
static |
|
static |
Definition at line 181 of file cam_xpt.c.
Referenced by camisr_runqueue(), xpt_done(), and xpt_init().
|
static |
Definition at line 182 of file cam_xpt.c.
Referenced by xpt_config(), and xpt_init().
|
static |
Definition at line 5562 of file cam_xpt.c.
Referenced by xpt_action_name().
|
static |
Definition at line 3947 of file cam_xpt.c.
Referenced by xpt_bus_register().
|
static |
|
static |
|
static |
struct cam_periph* xpt_periph |
Definition at line 188 of file cam_xpt.c.
Referenced by xpt_async_process(), xptdoioctl(), and xptregister().
|
static |
Definition at line 249 of file cam_xpt.c.
Referenced by xpt_action_default().
|
static |
Definition at line 309 of file cam_xpt.c.
Referenced by xpt_for_all_busses(), and xpt_for_all_devices().
|
static |
Definition at line 311 of file cam_xpt.c.
Referenced by xptdeftargetfunc().
|
static |
Definition at line 312 of file cam_xpt.c.
Referenced by xptdefdevicefunc().
|
static |
Definition at line 310 of file cam_xpt.c.
Referenced by xptdefbusfunc().
|
static |
Definition at line 204 of file cam_xpt.c.
Referenced by xptioctl().
|
static |
Definition at line 284 of file cam_xpt.c.
Referenced by xptedtmatch().
|
static |
Definition at line 286 of file cam_xpt.c.
Referenced by xptedttargetfunc().
|
static |
Definition at line 287 of file cam_xpt.c.
Referenced by xptedtdevicefunc().
|
static |
Definition at line 285 of file cam_xpt.c.
Referenced by xptedtbusfunc().
|
static |
Definition at line 269 of file cam_xpt.c.
Referenced by xpt_finishconfig_task().
|
static |
Definition at line 288 of file cam_xpt.c.
Referenced by xptperiphlistmatch().
|
static |
Definition at line 289 of file cam_xpt.c.
Referenced by xptplistpdrvfunc().
|
static |
Definition at line 323 of file cam_xpt.c.
Referenced by xpt_register_async().
|
static |
Definition at line 322 of file cam_xpt.c.
Referenced by xpt_register_async().
|
static |
Definition at line 163 of file cam_xpt.c.
Referenced by xpt_add_periph(), xpt_alloc_target(), xpt_announce_periph_sbuf(), xpt_announce_quirks_sbuf(), xpt_bus_register(), xpt_ch_done(), xpt_config(), xpt_denounce_periph_sbuf(), xpt_done_process(), xpt_find_bus(), xpt_hold_boot_locked(), xpt_init(), xpt_lock_buses(), xpt_release_boot(), xpt_release_bus(), xpt_release_device(), xpt_remove_periph(), xpt_rescan(), xpt_run_allocq(), xpt_run_devq(), xpt_scanner_thread(), xpt_unlock_buses(), xptbustraverse(), xptedtbusfunc(), xptedtdevicefunc(), xptedtmatch(), xptedtperiphfunc(), and xptnextfreepathid().