Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_periph.h
Show All 36 Lines | |||||
#include <cam/cam_sim.h> | #include <cam/cam_sim.h> | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <vm/uma.h> | |||||
#include <cam/cam_xpt.h> | #include <cam/cam_xpt.h> | ||||
struct devstat; | struct devstat; | ||||
extern struct cam_periph *xpt_periph; | extern struct cam_periph *xpt_periph; | ||||
extern struct periph_driver **periph_drivers; | extern struct periph_driver **periph_drivers; | ||||
void periphdriver_register(void *); | void periphdriver_register(void *); | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | #define CAM_PERIPH_RECOVERY_WAIT_FAILED 0x400 | ||||
int periph_allocated; | int periph_allocated; | ||||
u_int32_t refcount; | u_int32_t refcount; | ||||
SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */ | SLIST_HEAD(, ccb_hdr) ccb_list; /* For "immediate" requests */ | ||||
SLIST_ENTRY(cam_periph) periph_links; | SLIST_ENTRY(cam_periph) periph_links; | ||||
TAILQ_ENTRY(cam_periph) unit_links; | TAILQ_ENTRY(cam_periph) unit_links; | ||||
ac_callback_t *deferred_callback; | ac_callback_t *deferred_callback; | ||||
ac_code deferred_ac; | ac_code deferred_ac; | ||||
struct task periph_run_task; | struct task periph_run_task; | ||||
uma_zone_t ccb_zone; | |||||
}; | }; | ||||
mav: The concept of per-periph CCB type/size looks weird to me. What type would you use for pass… | |||||
#define CAM_PERIPH_MAXMAPS 2 | #define CAM_PERIPH_MAXMAPS 2 | ||||
struct cam_periph_map_info { | struct cam_periph_map_info { | ||||
int num_bufs_used; | int num_bufs_used; | ||||
void *orig[CAM_PERIPH_MAXMAPS]; | void *orig[CAM_PERIPH_MAXMAPS]; | ||||
struct buf *bp[CAM_PERIPH_MAXMAPS]; | struct buf *bp[CAM_PERIPH_MAXMAPS]; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 116 Lines • Show Last 20 Lines |
The concept of per-periph CCB type/size looks weird to me. What type would you use for pass periph for ATAPI drive, supporting ATA and SCSI commands?