summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/sd.c7
-rw-r--r--sys/scsi/sdvar.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index d2bc296b27e..0c72b47ccbf 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.191 2010/05/26 16:38:20 thib Exp $ */
+/* $OpenBSD: sd.c,v 1.192 2010/06/02 13:32:13 dlg Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -718,7 +718,9 @@ sdstart(struct scsi_xfer *xs)
scsi_xs_exec(xs);
/* move onto the next io */
- if (BUFQ_PEEK(sc->sc_bufq) != NULL)
+ if (ISSET(sc->flags, SDF_WAITING))
+ CLR(sc->flags, SDF_WAITING);
+ else if (BUFQ_PEEK(sc->sc_bufq) != NULL)
scsi_xsh_add(&sc->sc_xsh);
}
@@ -741,6 +743,7 @@ sd_buf_done(struct scsi_xfer *xs)
bp->b_flags & B_READ);
BUFQ_REQUEUE(sc->sc_bufq, bp);
scsi_xs_put(xs);
+ SET(sc->flags, SDF_WAITING);
timeout_add(&sc->sc_timeout, 1);
return;
diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h
index 396b1cd1da9..d5debe6a498 100644
--- a/sys/scsi/sdvar.h
+++ b/sys/scsi/sdvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdvar.h,v 1.30 2010/05/26 16:38:20 thib Exp $ */
+/* $OpenBSD: sdvar.h,v 1.31 2010/06/02 13:32:13 dlg Exp $ */
/* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */
/*-
@@ -61,6 +61,7 @@ struct sd_softc {
#define SDF_ANCIENT 0x10 /* disk is ancient; for minphys */
#define SDF_DIRTY 0x20 /* disk is dirty; needs cache flush */
#define SDF_DYING 0x40 /* dying, when deactivated */
+#define SDF_WAITING 0x80
struct scsi_link *sc_link; /* contains our targ, lun, etc. */
struct disk_parms {
u_long heads; /* number of heads */