summaryrefslogtreecommitdiffstats
path: root/sys/dev/mpt
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2002-09-03 02:18:21 +0000
committermjacob <mjacob@FreeBSD.org>2002-09-03 02:18:21 +0000
commit5dc5eb83434a29d15458748b690a21a4c2beec80 (patch)
treed136ccd80cec436342a04afc4651830e7e13c611 /sys/dev/mpt
parent573a3e8e5e20b467f547cc712016b11f63fc126e (diff)
downloadFreeBSD-src-5dc5eb83434a29d15458748b690a21a4c2beec80.zip
FreeBSD-src-5dc5eb83434a29d15458748b690a21a4c2beec80.tar.gz
Don't do transition locking (i.e., CAM->MPT->CAM)- Peter claimed that ia64
chokes the chicken with this. Submitted by: wemm@freebsd.org
Diffstat (limited to 'sys/dev/mpt')
-rw-r--r--sys/dev/mpt/mpt_freebsd.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/mpt/mpt_freebsd.h b/sys/dev/mpt/mpt_freebsd.h
index aa38147..84527bf 100644
--- a/sys/dev/mpt/mpt_freebsd.h
+++ b/sys/dev/mpt/mpt_freebsd.h
@@ -91,6 +91,7 @@
#define MPT_LOCK_SETUP(mpt)
#define MPT_LOCK_DESTROY(mpt)
#else
+#if LOCKING_WORKED_AS_IT_SHOULD
#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
#define MPT_LOCK_SETUP(mpt) \
mtx_init(&mpt->mpt_lock, "mpt", NULL, MTX_DEF); \
@@ -107,6 +108,15 @@
mtx_unlock(&(mpt)->mpt_lock); mtx_lock(&Giant)
#define CAMLOCK_2_MPTLOCK(mpt) \
mtx_unlock(&Giant); mtx_lock(&(mpt)->mpt_lock)
+#else
+#define MPT_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY
+#define MPT_LOCK_SETUP(mpt) do { } while (0)
+#define MPT_LOCK_DESTROY(mpt) do { } while (0)
+#define MPT_LOCK(mpt) do { } while (0)
+#define MPT_UNLOCK(mpt) do { } while (0)
+#define MPTLOCK_2_CAMLOCK(mpt) do { } while (0)
+#define CAMLOCK_2_MPTLOCK(mpt) do { } while (0)
+#endif
#endif
OpenPOWER on IntegriCloud