FreeBSD kernel CAM code
cam_xpt_internal.h File Reference
#include <sys/taskqueue.h>
Include dependency graph for cam_xpt_internal.h:
This graph shows which files directly or indirectly include this file:

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_edxpt_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)
 

Macro Definition Documentation

◆ CAM_DEV_DV_HIT_BOTTOM

#define CAM_DEV_DV_HIT_BOTTOM   0x100

Definition at line 147 of file cam_xpt_internal.h.

◆ CAM_DEV_IDENTIFY_DATA_VALID

#define CAM_DEV_IDENTIFY_DATA_VALID   0x200

Definition at line 148 of file cam_xpt_internal.h.

◆ CAM_DEV_IN_DV

#define CAM_DEV_IN_DV   0x80

Definition at line 146 of file cam_xpt_internal.h.

◆ CAM_DEV_INQUIRY_DATA_VALID

#define CAM_DEV_INQUIRY_DATA_VALID   0x40

Definition at line 145 of file cam_xpt_internal.h.

◆ CAM_DEV_REL_ON_COMPLETE

#define CAM_DEV_REL_ON_COMPLETE   0x04

Definition at line 142 of file cam_xpt_internal.h.

◆ CAM_DEV_REL_ON_QUEUE_EMPTY

#define CAM_DEV_REL_ON_QUEUE_EMPTY   0x08

Definition at line 143 of file cam_xpt_internal.h.

◆ CAM_DEV_REL_TIMEOUT_PENDING

#define CAM_DEV_REL_TIMEOUT_PENDING   0x02

Definition at line 141 of file cam_xpt_internal.h.

◆ CAM_DEV_TAG_AFTER_COUNT

#define CAM_DEV_TAG_AFTER_COUNT   0x20

Definition at line 144 of file cam_xpt_internal.h.

◆ CAM_DEV_UNCONFIGURED

#define CAM_DEV_UNCONFIGURED   0x01

Definition at line 140 of file cam_xpt_internal.h.

◆ CAM_EB_RUNQ_SCHEDULED

#define CAM_EB_RUNQ_SCHEDULED   0x01

Definition at line 192 of file cam_xpt_internal.h.

◆ CAM_TAG_DELAY_COUNT

#define CAM_TAG_DELAY_COUNT   5

Definition at line 150 of file cam_xpt_internal.h.

◆ CAM_XPT_PROTO

#define CAM_XPT_PROTO (   data)     DATA_SET(cam_xpt_proto_set, data)

Definition at line 92 of file cam_xpt_internal.h.

◆ CAM_XPT_XPORT

#define CAM_XPT_XPORT (   data)     DATA_SET(cam_xpt_xport_set, data)

Definition at line 70 of file cam_xpt_internal.h.

Typedef Documentation

◆ xpt_action_func

typedef void(* xpt_action_func) (union ccb *start_ccb)

Definition at line 45 of file cam_xpt_internal.h.

◆ xpt_alloc_device_func

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.

◆ xpt_announce_periph_func

typedef void(* xpt_announce_periph_func) (struct cam_periph *periph)

Definition at line 51 of file cam_xpt_internal.h.

◆ xpt_announce_periph_sbuf_func

typedef void(* xpt_announce_periph_sbuf_func) (struct cam_periph *periph, struct sbuf *sbuf)

Definition at line 52 of file cam_xpt_internal.h.

◆ xpt_dev_async_func

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.

◆ xpt_proto_announce_func

typedef void(* xpt_proto_announce_func) (struct cam_ed *)

Definition at line 73 of file cam_xpt_internal.h.

◆ xpt_proto_announce_sbuf_func

typedef void(* xpt_proto_announce_sbuf_func) (struct cam_ed *, struct sbuf *)

Definition at line 74 of file cam_xpt_internal.h.

◆ xpt_proto_debug_out_func

typedef void(* xpt_proto_debug_out_func) (union ccb *)

Definition at line 75 of file cam_xpt_internal.h.

◆ xpt_release_device_func

typedef void(* xpt_release_device_func) (struct cam_ed *device)

Definition at line 44 of file cam_xpt_internal.h.

Function Documentation

◆ MALLOC_DECLARE()

MALLOC_DECLARE ( M_CAMXPT  )

◆ SET_DECLARE() [1/2]

SET_DECLARE ( cam_xpt_proto_set  ,
struct xpt_proto   
)

◆ SET_DECLARE() [2/2]

SET_DECLARE ( cam_xpt_xport_set  ,
struct xpt_xport   
)

◆ xpt_acquire_device()

void xpt_acquire_device ( struct cam_ed device)

◆ xpt_alloc_device()

◆ xpt_dev_ccbq_resize()

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xpt_release_device()

◆ xpt_start_tags()

◆ xpt_stop_tags()