aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp
diff options
context:
space:
mode:
authorMatt Jacob <mjacob@FreeBSD.org>1999-08-16 20:01:14 +0000
committerMatt Jacob <mjacob@FreeBSD.org>1999-08-16 20:01:14 +0000
commit0f747d722c7b37901cd08fdd4c2488b49c8867da (patch)
tree8543c083c882dbbb52f24a344aa894b4a214839f /sys/dev/isp
parentce7f792d94b8c8ab8e03d8f0e948ccb9d2de3cbb (diff)
Notes
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/ispvar.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h
index 4fe1459c892c..5596934e8971 100644
--- a/sys/dev/isp/ispvar.h
+++ b/sys/dev/isp/ispvar.h
@@ -1,5 +1,4 @@
-/* $Id: ispvar.h,v 1.16 1999/07/02 22:46:31 mjacob Exp $ */
-/* release_6_5_99 */
+/* $Id: ispvar.h,v 1.17 1999/07/05 20:42:08 mjacob Exp $ */
/*
* Soft Definitions for for Qlogic ISP SCSI adapters.
*
@@ -68,7 +67,7 @@ struct ispmdvec {
const u_int16_t *dv_ispfw; /* ptr to f/w */
u_int16_t dv_fwlen; /* length of f/w */
u_int16_t dv_codeorg; /* code ORG for f/w */
- u_int16_t dv_fwrev; /* f/w revision */
+ u_int32_t dv_fwrev; /* f/w revision */
/*
* Initial values for conf1 register
*/
@@ -83,6 +82,17 @@ struct ispmdvec {
#define MAX_FC_TARG 126
#endif
+#define ISP_MAX_TARGETS(isp) (IS_FC(isp)? MAX_FC_TARG : MAX_TARGETS)
+#ifdef ISP2100_SCCLUN
+#define _ISP_FC_LUN(isp) 65536
+#else
+#define _ISP_FC_LUN(isp) 16
+#endif
+#define _ISP_SCSI_LUN(isp) \
+ ((ISP_FW_REVX(isp->isp_fwrev) >= ISP_FW_REV(7, 55, 0))? 32 : 8)
+#define ISP_MAX_LUNS(isp) \
+ (IS_FC(isp)? _ISP_FC_LUN(isp) : _ISP_SCSI_LUN(isp))
+
/* queue length must be a power of two */
#define QENTRY_LEN 64
#define RQUEST_QUEUE_LEN MAXISPREQUEST
@@ -353,6 +363,9 @@ struct ispsoftc {
#endif
};
+#define SDPARAM(isp) ((sdparam *) (isp)->isp_param)
+#define FCPARAM(isp) ((fcparam *) (isp)->isp_param)
+
/*
* ISP States
*/