summaryrefslogtreecommitdiff
path: root/sys/scsi/scsi_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/scsi/scsi_base.c')
-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);
}
/*