summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-06-02 13:32:14 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-06-02 13:32:14 +0000
commit8f81d491bfaa879deb0d76f5667a2ca2c66946c7 (patch)
tree30f4e96bb523b28b6fa80951553b931e2ae8f95f /sys/scsi/sd.c
parent18e538e1cfd80829a25574b940c9ed27f6de3afd (diff)
bring back the SDF_WAITING waiting flag while adapters still implement
NO_CCB. if sd_buf_done is told that the adapter has no more ccbs via NO_CCB, this sets a flag so sdstart doesnt try and queue more io straight away. this fixes the lockups on ciss that halex and okan were experiencing after the iopools code went in. it will fix any other hba that returns NO_CCB too. tested by me@, okan@, and halex@ ok krw@ okan@ halex@
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c7
1 files changed, 5 insertions, 2 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;