FreeBSD kernel CAM code
|
#include <sys/taskqueue.h>
Go to the source code of this file.
Data Structures | |
struct | xpt_xport_ops |
struct | xpt_xport |
struct | xpt_proto_ops |
struct | xpt_proto |
struct | cam_ed |
struct | cam_et |
struct | cam_eb |
struct | cam_path |
Macros | |
#define | CAM_XPT_XPORT(data) DATA_SET(cam_xpt_xport_set, data) |
#define | CAM_XPT_PROTO(data) DATA_SET(cam_xpt_proto_set, data) |
#define | CAM_DEV_UNCONFIGURED 0x01 |
#define | CAM_DEV_REL_TIMEOUT_PENDING 0x02 |
#define | CAM_DEV_REL_ON_COMPLETE 0x04 |
#define | CAM_DEV_REL_ON_QUEUE_EMPTY 0x08 |
#define | CAM_DEV_TAG_AFTER_COUNT 0x20 |
#define | CAM_DEV_INQUIRY_DATA_VALID 0x40 |
#define | CAM_DEV_IN_DV 0x80 |
#define | CAM_DEV_DV_HIT_BOTTOM 0x100 |
#define | CAM_DEV_IDENTIFY_DATA_VALID 0x200 |
#define | CAM_TAG_DELAY_COUNT 5 |
#define | CAM_EB_RUNQ_SCHEDULED 0x01 |
Typedefs | |
typedef struct cam_ed *(* | xpt_alloc_device_func) (struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) |
typedef void(* | xpt_release_device_func) (struct cam_ed *device) |
typedef void(* | xpt_action_func) (union ccb *start_ccb) |
typedef void(* | xpt_dev_async_func) (u_int32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg) |
typedef void(* | xpt_announce_periph_func) (struct cam_periph *periph) |
typedef void(* | xpt_announce_periph_sbuf_func) (struct cam_periph *periph, struct sbuf *sbuf) |
typedef void(* | xpt_proto_announce_func) (struct cam_ed *) |
typedef void(* | xpt_proto_announce_sbuf_func) (struct cam_ed *, struct sbuf *) |
typedef void(* | xpt_proto_debug_out_func) (union ccb *) |
Functions | |
SET_DECLARE (cam_xpt_xport_set, struct xpt_xport) | |
SET_DECLARE (cam_xpt_proto_set, struct xpt_proto) | |
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) |
MALLOC_DECLARE (M_CAMXPT) | |
#define CAM_DEV_DV_HIT_BOTTOM 0x100 |
Definition at line 147 of file cam_xpt_internal.h.
#define CAM_DEV_IDENTIFY_DATA_VALID 0x200 |
Definition at line 148 of file cam_xpt_internal.h.
#define CAM_DEV_IN_DV 0x80 |
Definition at line 146 of file cam_xpt_internal.h.
#define CAM_DEV_INQUIRY_DATA_VALID 0x40 |
Definition at line 145 of file cam_xpt_internal.h.
#define CAM_DEV_REL_ON_COMPLETE 0x04 |
Definition at line 142 of file cam_xpt_internal.h.
#define CAM_DEV_REL_ON_QUEUE_EMPTY 0x08 |
Definition at line 143 of file cam_xpt_internal.h.
#define CAM_DEV_REL_TIMEOUT_PENDING 0x02 |
Definition at line 141 of file cam_xpt_internal.h.
#define CAM_DEV_TAG_AFTER_COUNT 0x20 |
Definition at line 144 of file cam_xpt_internal.h.
#define CAM_DEV_UNCONFIGURED 0x01 |
Definition at line 140 of file cam_xpt_internal.h.
#define CAM_EB_RUNQ_SCHEDULED 0x01 |
Definition at line 192 of file cam_xpt_internal.h.
#define CAM_TAG_DELAY_COUNT 5 |
Definition at line 150 of file cam_xpt_internal.h.
#define CAM_XPT_PROTO | ( | data | ) | DATA_SET(cam_xpt_proto_set, data) |
Definition at line 92 of file cam_xpt_internal.h.
#define CAM_XPT_XPORT | ( | data | ) | DATA_SET(cam_xpt_xport_set, data) |
Definition at line 70 of file cam_xpt_internal.h.
typedef void(* xpt_action_func) (union ccb *start_ccb) |
Definition at line 45 of file cam_xpt_internal.h.
typedef struct cam_ed *(* xpt_alloc_device_func) (struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) |
Definition at line 1 of file cam_xpt_internal.h.
typedef void(* xpt_announce_periph_func) (struct cam_periph *periph) |
Definition at line 51 of file cam_xpt_internal.h.
typedef void(* xpt_announce_periph_sbuf_func) (struct cam_periph *periph, struct sbuf *sbuf) |
Definition at line 52 of file cam_xpt_internal.h.
typedef void(* xpt_dev_async_func) (u_int32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg) |
Definition at line 46 of file cam_xpt_internal.h.
typedef void(* xpt_proto_announce_func) (struct cam_ed *) |
Definition at line 73 of file cam_xpt_internal.h.
typedef void(* xpt_proto_announce_sbuf_func) (struct cam_ed *, struct sbuf *) |
Definition at line 74 of file cam_xpt_internal.h.
typedef void(* xpt_proto_debug_out_func) (union ccb *) |
Definition at line 75 of file cam_xpt_internal.h.
typedef void(* xpt_release_device_func) (struct cam_ed *device) |
Definition at line 44 of file cam_xpt_internal.h.
MALLOC_DECLARE | ( | M_CAMXPT | ) |
SET_DECLARE | ( | cam_xpt_proto_set | , |
struct xpt_proto | |||
) |
SET_DECLARE | ( | cam_xpt_xport_set | , |
struct xpt_xport | |||
) |
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().
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().
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_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_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().