summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_freebsd.h
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2002-09-03 04:31:55 +0000
committermjacob <mjacob@FreeBSD.org>2002-09-03 04:31:55 +0000
commit20072affec15c51574156e050f90e3cb9583209c (patch)
tree0758095db5c12c0566acb8a932eb6cc179f98c31 /sys/dev/isp/isp_freebsd.h
parent6faa305558432e71c661e8530e7f483b9ad47e70 (diff)
downloadFreeBSD-src-20072affec15c51574156e050f90e3cb9583209c.zip
FreeBSD-src-20072affec15c51574156e050f90e3cb9583209c.tar.gz
Turn off usage of SMP style locking until we sort out CAM.
Diffstat (limited to 'sys/dev/isp/isp_freebsd.h')
-rw-r--r--sys/dev/isp/isp_freebsd.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 392f3d9..929504c 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -73,7 +73,8 @@
#endif
#define HANDLE_LOOPSTATE_IN_OUTER_LAYERS 1
-#define ISP_SMPLOCK 1
+/* turn this off for now */
+/* #define ISP_SMPLOCK 1 */
#ifdef ISP_SMPLOCK
#define ISP_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE
@@ -165,12 +166,19 @@ struct isposinfo {
* Locking macros...
*/
+#ifdef ISP_SMPLOCK
#define ISP_LOCK(x) mtx_lock(&(x)->isp_lock)
#define ISP_UNLOCK(x) mtx_unlock(&(x)->isp_lock)
#define ISPLOCK_2_CAMLOCK(isp) \
mtx_unlock(&(isp)->isp_lock); mtx_lock(&Giant)
#define CAMLOCK_2_ISPLOCK(isp) \
mtx_unlock(&Giant); mtx_lock(&(isp)->isp_lock)
+#else
+#define ISP_LOCK(x) do { } while (0)
+#define ISP_UNLOCK(x) do { } while (0)
+#define ISPLOCK_2_CAMLOCK(isp) do { } while (0)
+#define CAMLOCK_2_ISPLOCK(isp) do { } while (0)
+#endif
/*
* Required Macros/Defines
@@ -411,8 +419,13 @@ isp_mbox_wait_complete(struct ispsoftc *isp)
if (isp->isp_osinfo.intsok) {
int lim = ((isp->isp_mbxwrk0)? 120 : 20) * hz;
isp->isp_osinfo.mboxwaiting = 1;
+#ifdef ISP_SMPLOCK
(void) msleep(&isp->isp_mbxworkp,
&isp->isp_lock, PRIBIO, "isp_mboxwaiting", lim);
+#else
+ (void) tsleep(&isp->isp_mbxworkp,
+ PRIBIO, "isp_mboxwaiting", lim);
+#endif
if (isp->isp_mboxbsy != 0) {
isp_prt(isp, ISP_LOGWARN,
"Interrupting Mailbox Command (0x%x) Timeout",
OpenPOWER on IntegriCloud