FreeBSD kernel CAM code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/types.h>
#include <sys/kernel.h>
#include <sys/conf.h>
#include <sys/fcntl.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_xpt.h>
#include <cam/cam_compat.h>
#include <cam/cam_periph.h>
#include <cam/scsi/scsi_pass.h>
#include "opt_cam.h"
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | cam_compat_handle_0x17 (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp) |
static int | cam_compat_handle_0x18 (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp) |
static int | cam_compat_handle_0x19 (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp) |
static int | cam_compat_translate_dev_match_0x18 (union ccb *ccb) |
int | cam_compat_ioctl (struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td, d_ioctl_t *cbfnp) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 137 of file cam_compat.c.
References ccb_pathinq::async_flags, ccb_pathinq_0x17::async_flags, ccb_pathinq::base_transfer_speed, ccb_pathinq_0x17::base_transfer_speed, ccb_pathinq::bus_id, ccb_pathinq_0x17::bus_id, CAM_0X17_DATA_LEN, cam_compat_handle_0x19(), cam_compat_translate_dev_match_0x18(), ccb_hdr::cbfcnp, ccb_hdr_0x17::cbfcnp, ccb, ccb::ccb_h, ccb::cpi, ccb::cts, cts, DEV_IDLEN, ccb_pathinq::dev_name, ccb_pathinq_0x17::dev_name, ccb_hdr::flags, ccb_hdr_0x17::flags, ccb_hdr::func_code, ccb_hdr_0x17::func_code, ccb_pathinq::hba_device, ccb_pathinq_0x17::hba_device, ccb_pathinq::hba_eng_cnt, ccb_pathinq_0x17::hba_eng_cnt, HBA_IDLEN, ccb_pathinq::hba_inquiry, ccb_pathinq_0x17::hba_inquiry, ccb_pathinq::hba_misc, ccb_pathinq_0x17::hba_misc, ccb_pathinq::hba_subdevice, ccb_pathinq_0x17::hba_subdevice, ccb_pathinq::hba_subvendor, ccb_pathinq_0x17::hba_subvendor, ccb_pathinq::hba_vendor, ccb_pathinq_0x17::hba_vendor, ccb_pathinq::hba_vid, ccb_pathinq_0x17::hba_vid, ccb_pathinq::hpath_id, ccb_pathinq_0x17::hpath_id, ccb_pathinq::initiator_id, ccb_pathinq_0x17::initiator_id, ccb_pathinq::max_lun, ccb_pathinq_0x17::max_lun, ccb_pathinq::max_target, ccb_pathinq_0x17::max_target, ccb_pathinq::maxio, ccb_pathinq_0x17::maxio, ccb_hdr::path, ccb_hdr_0x17::path, ccb_hdr::path_id, ccb_hdr_0x17::path_id, PATHINQ_SETTINGS_SIZE, ccb_hdr::periph_links, ccb_hdr_0x17::periph_links, ccb_hdr::periph_priv, ccb_hdr_0x17::periph_priv, ccb_hdr::pinfo, ccb_hdr_0x17::pinfo, ccb_trans_settings_0x17::proto_specific, ccb_pathinq::protocol, ccb_pathinq_0x17::protocol, ccb_trans_settings_0x17::protocol, ccb_pathinq::protocol_version, ccb_pathinq_0x17::protocol_version, ccb_trans_settings_0x17::protocol_version, ccb_hdr::retry_count, ccb_hdr_0x17::retry_count, SIM_IDLEN, ccb_hdr::sim_links, ccb_hdr_0x17::sim_links, ccb_hdr::sim_priv, ccb_hdr_0x17::sim_priv, ccb_pathinq::sim_vid, ccb_pathinq_0x17::sim_vid, ccb_hdr::softtimeout, ccb_hdr::status, ccb_hdr_0x17::status, ccb_hdr::target_id, ccb_hdr_0x17::target_id, ccb_hdr::target_lun, ccb_hdr_0x17::target_lun, ccb_pathinq::target_sprt, ccb_pathinq_0x17::target_sprt, ccb_hdr::timeout, ccb_hdr_0x17::timeout, ccb_pathinq::transport, ccb_pathinq_0x17::transport, ccb_trans_settings_0x17::transport, ccb_pathinq::transport_version, ccb_pathinq_0x17::transport_version, ccb_trans_settings_0x17::transport_version, ccb_trans_settings_0x17::type, ccb_pathinq::unit_number, ccb_pathinq_0x17::unit_number, ccb_pathinq::version_num, ccb_pathinq_0x17::version_num, ccb_pathinq::vuhba_flags, ccb_pathinq_0x17::vuhba_flags, VUHBALEN, ccb_hdr::xflags, ccb_pathinq::xport_specific, ccb_pathinq_0x17::xport_specific, ccb_trans_settings_0x17::xport_specific, xpt_alloc_ccb(), XPT_DEV_MATCH, xpt_free_ccb(), XPT_GET_TRAN_SETTINGS, ccb_hdr::xpt_links, ccb_hdr_0x17::xpt_links, XPT_PATH_INQ, and XPT_SET_TRAN_SETTINGS.
Referenced by cam_compat_ioctl().
|
static |
Definition at line 275 of file cam_compat.c.
References CAM_0X18_DATA_LEN, cam_compat_handle_0x19(), cam_compat_translate_dev_match_0x18(), CAM_EXTLUN_VALID_0x18, ccb_hdr::cbfcnp, ccb_hdr_0x18::cbfcnp, ccb, ccb::ccb_h, ccb::cts, cts, ccb_hdr_0x18::ext_lun, ccb_hdr::flags, ccb_hdr_0x18::flags, ccb_hdr::func_code, ccb_hdr_0x18::func_code, ccb_hdr::path, ccb_hdr_0x18::path, ccb_hdr::path_id, ccb_hdr_0x18::path_id, ccb_hdr::periph_links, ccb_hdr_0x18::periph_links, ccb_hdr::periph_priv, ccb_hdr_0x18::periph_priv, ccb_hdr::pinfo, ccb_hdr_0x18::pinfo, ccb_trans_settings_0x18::proto_specific, ccb_trans_settings_0x18::protocol, ccb_trans_settings_0x18::protocol_version, ccb_hdr::retry_count, ccb_hdr_0x18::retry_count, ccb_hdr::sim_links, ccb_hdr_0x18::sim_links, ccb_hdr::sim_priv, ccb_hdr_0x18::sim_priv, ccb_hdr::softtimeout, ccb_hdr::status, ccb_hdr_0x18::status, ccb_hdr::target_id, ccb_hdr_0x18::target_id, ccb_hdr::target_lun, ccb_hdr_0x18::target_lun, ccb_hdr::timeout, ccb_hdr_0x18::timeout, ccb_trans_settings_0x18::transport, ccb_trans_settings_0x18::transport_version, ccb_trans_settings_0x18::type, ccb_hdr::xflags, ccb_hdr_0x18::xflags, ccb_trans_settings_0x18::xport_specific, xpt_alloc_ccb(), XPT_DEV_MATCH, xpt_free_ccb(), XPT_GET_TRAN_SETTINGS, ccb_hdr::xpt_links, ccb_hdr_0x18::xpt_links, and XPT_SET_TRAN_SETTINGS.
Referenced by cam_compat_ioctl().
|
static |
Definition at line 443 of file cam_compat.c.
References BUS_MATCH_ANY, match_pattern::bus_pattern, cam_periph_mapmem(), cam_periph_unmapmem(), CAMIOCOMMAND, ccb::ccb_h, ccb::cdm, DEV_MATCH_ANY, DEV_MATCH_BUS, DEV_MATCH_DEVICE, DEV_MATCH_PERIPH, match_pattern::device_pattern, periph_match_pattern::flags, device_match_pattern::flags, bus_match_pattern::flags, ccb_hdr::func_code, ccb_dev_match::num_patterns, dev_match_pattern::pattern, ccb_dev_match::patterns, PERIPH_MATCH_ANY, match_pattern::periph_pattern, dev_match_pattern::type, and XPT_DEV_MATCH.
Referenced by cam_compat_handle_0x17(), cam_compat_handle_0x18(), and cam_compat_ioctl().
int cam_compat_ioctl | ( | struct cdev * | dev, |
u_long | cmd, | ||
caddr_t | addr, | ||
int | flag, | ||
struct thread * | td, | ||
d_ioctl_t * | cbfnp | ||
) |
Definition at line 66 of file cam_compat.c.
References cam_compat_handle_0x17(), cam_compat_handle_0x18(), cam_compat_handle_0x19(), CAM_DATA_PADDR, CAM_DATA_PHYS_0x16, CAM_DATA_SG, CAM_DATA_SG_PADDR, CAM_SCATTER_VALID_0x16, CAM_SG_LIST_PHYS_0x16, CAMGETPASSTHRU, CAMGETPASSTHRU_0x16, CAMGETPASSTHRU_0x17, CAMGETPASSTHRU_0x18, CAMGETPASSTHRU_0x19, CAMIOCOMMAND, CAMIOCOMMAND_0x16, CAMIOCOMMAND_0x17, CAMIOCOMMAND_0x18, CAMIOCOMMAND_0x19, CAMIOGET, CAMIOGET_0x19, CAMIOQUEUE, CAMIOQUEUE_0x19, and ccb_hdr_0x17::flags.
Referenced by passioctl(), and xptioctl().
|
static |
Definition at line 380 of file cam_compat.c.
References match_result::bus_result, cam_periph_mapmem(), cam_periph_unmapmem(), ccb::cdm, DEV_IDLEN, DEV_MATCH_BUS, DEV_MATCH_DEVICE, DEV_MATCH_PERIPH, match_result::device_result, dev_match_result_0x18::device_result, device_match_result::flags, dev_match_result_0x18::flags, device_match_result::ident_data, device_match_result::inq_data, ccb_dev_match::matches, ccb_dev_match::num_matches, periph_match_result::path_id, device_match_result::path_id, dev_match_result_0x18::path_id, periph_match_result::periph_name, match_result::periph_result, dev_match_result_0x18::periph_result, device_match_result::protocol, dev_match_result_0x18::protocol, dev_match_result::result, dev_match_result_0x18::result, periph_match_result::target_id, device_match_result::target_id, dev_match_result_0x18::target_id, periph_match_result::target_lun, device_match_result::target_lun, dev_match_result_0x18::target_lun, dev_match_result::type, dev_match_result_0x18::type, periph_match_result::unit_number, and dev_match_result_0x18::unit_number.
Referenced by cam_compat_handle_0x17(), and cam_compat_handle_0x18().