Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_xpt.h
Show All 32 Lines | |||||
#ifndef _CAM_CAM_XPT_H | #ifndef _CAM_CAM_XPT_H | ||||
#define _CAM_CAM_XPT_H 1 | #define _CAM_CAM_XPT_H 1 | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#endif | #endif | ||||
#include <cam/cam_ccb.h> | |||||
asomers: I think this `#include` should lie within the `#ifdef _KERNEL` block. | |||||
/* Forward Declarations */ | /* Forward Declarations */ | ||||
union ccb; | |||||
struct cam_periph; | struct cam_periph; | ||||
struct cam_ed; | struct cam_ed; | ||||
struct cam_sim; | struct cam_sim; | ||||
struct sbuf; | struct sbuf; | ||||
/* | /* | ||||
* Definition of a CAM path. Paths are created from bus, target, and lun ids | * Definition of a CAM path. Paths are created from bus, target, and lun ids | ||||
* via xpt_create_path and allow for reference to devices without recurring | * via xpt_create_path and allow for reference to devices without recurring | ||||
▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
void xpt_copy_path(struct cam_path *new_path, | void xpt_copy_path(struct cam_path *new_path, | ||||
struct cam_path *path); | struct cam_path *path); | ||||
void xpt_release_path(struct cam_path *path); | void xpt_release_path(struct cam_path *path); | ||||
const char * xpt_action_name(uint32_t action); | const char * xpt_action_name(uint32_t action); | ||||
void xpt_poll(union ccb *start_ccb, uint32_t timeout); | void xpt_poll(union ccb *start_ccb, uint32_t timeout); | ||||
uint32_t xpt_poll_setup(union ccb *start_ccb); | uint32_t xpt_poll_setup(union ccb *start_ccb); | ||||
/* | |||||
* Perform a path inquiry at the request priority. The bzero may be | |||||
* unnecessary. | |||||
*/ | |||||
static inline void | |||||
xpt_path_inq(struct ccb_pathinq *cpi, struct cam_path *path, uint32_t prio) | |||||
{ | |||||
bzero(cpi, sizeof(*cpi)); | |||||
xpt_setup_ccb(&cpi->ccb_h, path, prio); | |||||
cpi->ccb_h.func_code = XPT_PATH_INQ; | |||||
xpt_action((union ccb *)cpi); | |||||
} | |||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _CAM_CAM_XPT_H */ | #endif /* _CAM_CAM_XPT_H */ |
I think this #include should lie within the #ifdef _KERNEL block.