summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2010-01-09 21:04:55 +0000
committerdlg <dlg@openbsd.org>2010-01-09 21:04:55 +0000
commitce97085af0eecf8b119e8f3d9dc146a601800a3e (patch)
treece971111c1fc98a4a31d72b7ad1fead04f86ddc3
parentDefine struct cpu_hwinfo, to hold hardware specific information about each (diff)
downloadwireguard-openbsd-ce97085af0eecf8b119e8f3d9dc146a601800a3e.tar.xz
wireguard-openbsd-ce97085af0eecf8b119e8f3d9dc146a601800a3e.zip
always try to restart io on a device when an opening is made available from
scsi_xs_put.
-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);
}
/*