summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/cam/cam_xpt.h
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/cam/cam_xpt.h')
-rw-r--r--freebsd/sys/cam/cam_xpt.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/freebsd/sys/cam/cam_xpt.h b/freebsd/sys/cam/cam_xpt.h
index 97933b98..ba5c924a 100644
--- a/freebsd/sys/cam/cam_xpt.h
+++ b/freebsd/sys/cam/cam_xpt.h
@@ -56,6 +56,7 @@ struct cam_path;
struct async_node {
SLIST_ENTRY(async_node) links;
u_int32_t event_enable; /* Async Event enables */
+ u_int32_t event_lock; /* Take SIM lock for handlers. */
void (*callback)(void *arg, u_int32_t code,
struct cam_path *path, void *args);
void *callback_arg;
@@ -69,6 +70,10 @@ void xpt_action_default(union ccb *new_ccb);
union ccb *xpt_alloc_ccb(void);
union ccb *xpt_alloc_ccb_nowait(void);
void xpt_free_ccb(union ccb *free_ccb);
+void xpt_setup_ccb_flags(struct ccb_hdr *ccb_h,
+ struct cam_path *path,
+ u_int32_t priority,
+ u_int32_t flags);
void xpt_setup_ccb(struct ccb_hdr *ccb_h,
struct cam_path *path,
u_int32_t priority);
@@ -100,7 +105,6 @@ int xpt_path_string(struct cam_path *path, char *str,
path_id_t xpt_path_path_id(struct cam_path *path);
target_id_t xpt_path_target_id(struct cam_path *path);
lun_id_t xpt_path_lun_id(struct cam_path *path);
-int xpt_path_legacy_ata_id(struct cam_path *path);
struct cam_sim *xpt_path_sim(struct cam_path *path);
struct cam_periph *xpt_path_periph(struct cam_path *path);
void xpt_async(u_int32_t async_code, struct cam_path *path,
@@ -110,6 +114,13 @@ void xpt_hold_boot(void);
void xpt_release_boot(void);
void xpt_lock_buses(void);
void xpt_unlock_buses(void);
+struct mtx * xpt_path_mtx(struct cam_path *path);
+#define xpt_path_lock(path) mtx_lock(xpt_path_mtx(path))
+#define xpt_path_unlock(path) mtx_unlock(xpt_path_mtx(path))
+#define xpt_path_assert(path, what) mtx_assert(xpt_path_mtx(path), (what))
+#define xpt_path_owned(path) mtx_owned(xpt_path_mtx(path))
+#define xpt_path_sleep(path, chan, priority, wmesg, timo) \
+ msleep((chan), xpt_path_mtx(path), (priority), (wmesg), (timo))
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,
@@ -117,6 +128,10 @@ cam_status xpt_compile_path(struct cam_path *new_path,
path_id_t path_id,
target_id_t target_id,
lun_id_t lun_id);
+cam_status xpt_clone_path(struct cam_path **new_path,
+ struct cam_path *path);
+void xpt_copy_path(struct cam_path *new_path,
+ struct cam_path *path);
void xpt_release_path(struct cam_path *path);