aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/cam_xpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cam/cam_xpt.h')
-rw-r--r--sys/cam/cam_xpt.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h
index 26ca65769d12..283cad1c34e6 100644
--- a/sys/cam/cam_xpt.h
+++ b/sys/cam/cam_xpt.h
@@ -48,7 +48,45 @@ struct cam_path;
#ifdef _KERNEL
+/*
+ * Definition of an async handler callback block. These are used to add
+ * SIMs and peripherals to the async callback lists.
+ */
+struct async_node {
+ SLIST_ENTRY(async_node) links;
+ u_int32_t event_enable; /* Async Event enables */
+ void (*callback)(void *arg, u_int32_t code,
+ struct cam_path *path, void *args);
+ void *callback_arg;
+};
+
+SLIST_HEAD(async_list, async_node);
+SLIST_HEAD(periph_list, cam_periph);
+
+#if defined(CAM_DEBUG_FLAGS) && !defined(CAMDEBUG)
+#error "You must have options CAMDEBUG to use options CAM_DEBUG_FLAGS"
+#endif
+
+/*
+ * In order to enable the CAM_DEBUG_* options, the user must have CAMDEBUG
+ * enabled. Also, the user must have either none, or all of CAM_DEBUG_BUS,
+ * CAM_DEBUG_TARGET, and CAM_DEBUG_LUN specified.
+ */
+#if defined(CAM_DEBUG_BUS) || defined(CAM_DEBUG_TARGET) \
+ || defined(CAM_DEBUG_LUN)
+#ifdef CAMDEBUG
+#if !defined(CAM_DEBUG_BUS) || !defined(CAM_DEBUG_TARGET) \
+ || !defined(CAM_DEBUG_LUN)
+#error "You must define all or none of CAM_DEBUG_BUS, CAM_DEBUG_TARGET \
+ and CAM_DEBUG_LUN"
+#endif /* !CAM_DEBUG_BUS || !CAM_DEBUG_TARGET || !CAM_DEBUG_LUN */
+#else /* !CAMDEBUG */
+#error "You must use options CAMDEBUG if you use the CAM_DEBUG_* options"
+#endif /* CAMDEBUG */
+#endif /* CAM_DEBUG_BUS || CAM_DEBUG_TARGET || CAM_DEBUG_LUN */
+
void xpt_action(union ccb *new_ccb);
+void xpt_action_default(union ccb *new_ccb);
void xpt_setup_ccb(struct ccb_hdr *ccb_h,
struct cam_path *path,
u_int32_t priority);
@@ -81,6 +119,14 @@ void xpt_lock_buses(void);
void xpt_unlock_buses(void);
cam_status xpt_register_async(int event, ac_callback_t *cbfunc,
void *cbarg, struct cam_path *path);
+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);
+
+void xpt_release_path(struct cam_path *path);
+
#endif /* _KERNEL */
#endif /* _CAM_CAM_XPT_H */