summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2001-04-04 21:56:15 +0000
committermjacob <mjacob@FreeBSD.org>2001-04-04 21:56:15 +0000
commit773865294861e9c5cd382a9d9c15525c18557f1f (patch)
tree52e4320ed1a5a1005304adadb99e6bddcc5e6693 /sys/dev/isp
parentacc5f5724452f51201c3b23eeb949ccd8bca5ea2 (diff)
downloadFreeBSD-src-773865294861e9c5cd382a9d9c15525c18557f1f.zip
FreeBSD-src-773865294861e9c5cd382a9d9c15525c18557f1f.tar.gz
Roll platform minor.
Change target mode state definitions to be aware of 'channel' (for the dualbus 1280/12160 cards).
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp_freebsd.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 106b65d..4598db7 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -28,7 +28,7 @@
#define _ISP_FREEBSD_H
#define ISP_PLATFORM_VERSION_MAJOR 5
-#define ISP_PLATFORM_VERSION_MINOR 6
+#define ISP_PLATFORM_VERSION_MINOR 7
/*
* We're not ready for primetime yet
@@ -79,19 +79,15 @@ typedef struct tstate {
struct ccb_hdr_slist atios;
struct ccb_hdr_slist inots;
lun_id_t lun;
+ int bus;
u_int32_t hold;
} tstate_t;
-/*
- * This should work very well for 100% of parallel SCSI cases, 100%
- * of non-SCCLUN FC cases, and hopefully some larger fraction of the
- * SCCLUN FC cases. Basically, we index by the low 5 bits of lun and
- * then linear search. This has to be reasonably zippy, but not crucially
- * so.
- */
-#define LUN_HASH_SIZE 32
-#define LUN_HASH_FUNC(lun) ((lun) & 0x1f)
-
+#define LUN_HASH_SIZE 32
+#define LUN_HASH_FUNC(isp, port, lun) \
+ ((IS_DUALBUS(isp)) ? \
+ (((lun) & ((LUN_HASH_SIZE >> 1) - 1)) << (port)) : \
+ ((lun) & (LUN_HASH_SIZE - 1)))
#endif
struct isposinfo {
@@ -115,13 +111,13 @@ struct isposinfo {
int splsaved;
#endif
#ifdef ISP_TARGET_MODE
-#define TM_WANTED 0x01
-#define TM_BUSY 0x02
-#define TM_TMODE_ENABLED 0x80
+#define TM_WANTED 0x80
+#define TM_BUSY 0x40
+#define TM_TMODE_ENABLED 0x03
u_int8_t tmflags;
u_int8_t rstatus;
u_int16_t rollinfo;
- tstate_t tsdflt;
+ tstate_t tsdflt[2]; /* two busses */
tstate_t *lun_hash[LUN_HASH_SIZE];
#endif
};
OpenPOWER on IntegriCloud