summaryrefslogtreecommitdiff
path: root/sys/dev/ic/isp_openbsd.h
diff options
context:
space:
mode:
authormjacob <mjacob@cvs.openbsd.org>2000-12-06 01:07:24 +0000
committermjacob <mjacob@cvs.openbsd.org>2000-12-06 01:07:24 +0000
commitc70f3f9f0bbbc52b0552703642baf6b5d4ea3975 (patch)
tree0a5ac0f3aee2621f25501c6b87ef8af732fca14a /sys/dev/ic/isp_openbsd.h
parenta3c56baf1776d67e865aedba84545540a5da2da0 (diff)
Update isp codebase to current common head- USEC_SLEEP macro added,
instrumentation for interrupts, specific topology preferences for the 2200. Fix the hole in the OpenBSD port becuause there'd been no maxluns limit from the midlayer and have the command routine bounce commands > the maxluns for a particular controller (in particular, Qlogic FC cards where we can't tell when it hasn't been us that have loaded the F/W whether or not SCCLUN is in effect or not).
Diffstat (limited to 'sys/dev/ic/isp_openbsd.h')
-rw-r--r--sys/dev/ic/isp_openbsd.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/dev/ic/isp_openbsd.h b/sys/dev/ic/isp_openbsd.h
index 1d8d2c511ae..92311aa2167 100644
--- a/sys/dev/ic/isp_openbsd.h
+++ b/sys/dev/ic/isp_openbsd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_openbsd.h,v 1.10 2000/10/16 01:02:00 mjacob Exp $ */
+/* $OpenBSD: isp_openbsd.h,v 1.11 2000/12/06 01:07:23 mjacob Exp $ */
/*
* OpenBSD Specific definitions for the Qlogic ISP Host Adapter
*/
@@ -75,6 +75,14 @@ struct isposinfo {
struct scsi_xfer *wqf, *wqt;
struct timeout rqt;
};
+#define MUST_POLL(isp) \
+ (isp->isp_osinfo.onintstack || isp->isp_osinfo.no_mbox_ints)
+
+/*
+ * Locking macros...
+ */
+#define ISP_LOCK isp_lock
+#define ISP_UNLOCK isp_unlock
/*
* Required Macros/Defines
@@ -90,6 +98,12 @@ struct isposinfo {
#define SNPRINTF snprintf
#define STRNCAT strncat
#define USEC_DELAY(x) delay(x)
+#define USEC_SLEEP(isp, x) \
+ if (!MUST_POLL(isp)) \
+ ISP_UNLOCK(isp); \
+ delay(x); \
+ if (!MUST_POLL(isp)) \
+ ISP_LOCK(isp)
#define NANOTIME_T struct timeval
#define GET_NANOTIME microtime
@@ -234,14 +248,6 @@ static void isp_wait_complete __P((struct ispsoftc *));
* Driver wide data...
*/
-/*
- * Locking macros...
- */
-#define ISP_LOCK isp_lock
-#define ISP_UNLOCK isp_unlock
-#define ISP_ILOCK(x) isp_lock(x); isp->isp_osinfo.onintstack++
-#define ISP_IUNLOCK(x) isp->isp_osinfo.onintstack--; isp_unlock(x)
-
/*
* Platform private flags
*/
@@ -328,7 +334,7 @@ static inline void
isp_wait_complete(isp)
struct ispsoftc *isp;
{
- if (isp->isp_osinfo.onintstack || isp->isp_osinfo.no_mbox_ints) {
+ if (MUST_POLL(isp)) {
int usecs = 0;
while (usecs < 2 * 1000000) {
(void) isp_intr(isp);