summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-01-09 21:04:56 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-01-09 21:04:56 +0000
commit0acd547b2e00191799edec5d0d889e5a8cd99aa1 (patch)
treed8dd094f557720403585a8d10ca4a2e4a8d3a6b2 /sys
parent87b483e2a7df54e7ed2f12b9849b2536d55e9082 (diff)
always try to restart io on a device when an opening is made available from
scsi_xs_put.
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/scsi_base.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index d0614255c39..5e4c749d618 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.152 2010/01/07 00:11:15 dlg Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.153 2010/01/09 21:04:55 dlg Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -232,6 +232,7 @@ void
scsi_xs_put(struct scsi_xfer *xs)
{
struct scsi_link *link = xs->sc_link;
+ int start = 1;
pool_put(&scsi_xfer_pool, xs);
@@ -242,8 +243,12 @@ scsi_xs_put(struct scsi_xfer *xs)
if (ISSET(link->state, SDEV_S_WAITING)) {
atomic_clearbits_int(&link->state, SDEV_S_WAITING);
wakeup(link);
+ start = 0;
}
mtx_leave(&link->mtx);
+
+ if (start && link->device->start)
+ link->device->start(link->device_softc);
}
/*