diff options
author | imp <imp@FreeBSD.org> | 2016-03-15 05:17:29 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2016-03-15 05:17:29 +0000 |
commit | e9a62530aa2a12318895252d7de4b3e6de326263 (patch) | |
tree | ef0a6e8af243ccce4bc07cab8b236d26411e282c /sys/cam | |
parent | 6695f06328167998684f8edec76d2371afc9a86e (diff) | |
download | FreeBSD-src-e9a62530aa2a12318895252d7de4b3e6de326263.zip FreeBSD-src-e9a62530aa2a12318895252d7de4b3e6de326263.tar.gz |
Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the
drivers I've touched, filter out CAM_CDB_PHYS.
Differential Revision: https://reviews.freebsd.org/D5585
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/cam_ccb.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 4e1e6a2..28415ed 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -725,6 +725,13 @@ struct ccb_scsiio { u_int init_id; /* initiator id of who selected */ }; +static __inline uint8_t * +scsiio_cdb_ptr(struct ccb_scsiio *ccb) +{ + return ((ccb->ccb_h.flags & CAM_CDB_POINTER) ? + ccb->cdb_io.cdb_ptr : ccb->cdb_io.cdb_bytes); +} + /* * ATA I/O Request CCB used for the XPT_ATA_IO function code. */ |