summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2000-07-14 19:40:54 +0000
committermjacob <mjacob@FreeBSD.org>2000-07-14 19:40:54 +0000
commit1ee69f5fc1a1d47e451a6491901cdb1f42ac413a (patch)
treeba3366aa6ceafdfdfb2d3d5a55b53ee96cba043c /sys
parent4d1ab12c45eab7592596972b2758bf3b71472a09 (diff)
downloadFreeBSD-src-1ee69f5fc1a1d47e451a6491901cdb1f42ac413a.zip
FreeBSD-src-1ee69f5fc1a1d47e451a6491901cdb1f42ac413a.tar.gz
Add SCSI_CDB6_LEN macro (where 0 ==> 256).
Obtained from:gibbs@freebsd.org
Diffstat (limited to 'sys')
-rw-r--r--sys/cam/scsi/scsi_all.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_all.h b/sys/cam/scsi/scsi_all.h
index 083b836..b88ad73 100644
--- a/sys/cam/scsi/scsi_all.h
+++ b/sys/cam/scsi/scsi_all.h
@@ -74,6 +74,9 @@
#error "CAM_MAX_CDBLEN cannot be less than SCSI_MAX_CDBLEN"
#endif
+/* 6byte CDBs special case 0 length to be 256 */
+#define SCSI_CDB6_LEN(len) ((len) == 0 ? 256 : len)
+
/*
* This type defines actions to be taken when a particular sense code is
* received. Right now, these flags are only defined to take up 16 bits,
OpenPOWER on IntegriCloud