summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-04-17 00:51:14 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-04-17 00:51:14 +0000
commitc1ab0af8de28ba128f274eb08a21f54d8d23c62c (patch)
treee642be2374b4eda78f8f8e19baf625334ddfd9b2
parentd2c5b5c3330c17346250358a37749bfadab71a50 (diff)
use the iopools mutex to protect the semaphore wrapping the openings
runqueue. less is more sometimes.
-rw-r--r--sys/scsi/scsi_base.c6
-rw-r--r--sys/scsi/scsiconf.c3
-rw-r--r--sys/scsi/scsiconf.h3
3 files changed, 5 insertions, 7 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 39de705e8b7..8efa68b2f0d 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.170 2010/04/16 09:51:30 dlg Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.171 2010/04/17 00:51:13 dlg Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -478,7 +478,7 @@ scsi_xsh_runqueue(struct scsi_link *link)
struct scsi_runq_entry *entry;
int runq;
- if (!scsi_sem_enter(&link->mtx, &link->running))
+ if (!scsi_sem_enter(&link->pool->mtx, &link->running))
return;
do {
runq = 0;
@@ -498,7 +498,7 @@ scsi_xsh_runqueue(struct scsi_link *link)
if (runq)
scsi_ioh_runqueue(link->pool);
- } while (!scsi_sem_leave(&link->mtx, &link->running));
+ } while (!scsi_sem_leave(&link->pool->mtx, &link->running));
}
void
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 81b64cff7c5..04e563d2a9c 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.155 2010/04/06 00:58:00 dlg Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.156 2010/04/17 00:51:13 dlg Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -862,7 +862,6 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun)
sc_link->target = target;
sc_link->lun = lun;
sc_link->device = &probe_switch;
- mtx_init(&sc_link->mtx, IPL_BIO);
TAILQ_INIT(&sc_link->queue);
inqbuf = &sc_link->inqdata;
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index bc59cb07068..deab59c52c9 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.123 2010/04/16 09:52:04 dlg Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.124 2010/04/17 00:51:13 dlg Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -423,7 +423,6 @@ struct scsi_link {
struct scsibus_softc *bus; /* link to the scsibus we're on */
struct scsi_inquiry_data inqdata; /* copy of INQUIRY data from probe */
struct devid *id;
- struct mutex mtx;
struct scsi_runq queue;
u_int running;