summaryrefslogtreecommitdiff
path: root/sys/scsi/sd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2010-01-15 05:31:39 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2010-01-15 05:31:39 +0000
commit2761e5bb53a1d6d65150c51d5f84dc68bb1daf49 (patch)
tree276efc68e1c70f280685bcbb2f7885094b221b2f /sys/scsi/sd.c
parentb60aa9823e739c74582e350bad5d6892ed2c1bbb (diff)
Restore XS_BUSY delay behaviour for buf i/o. Same as for sync path.
ok dlg@
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r--sys/scsi/sd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 8017da081e1..9039252c951 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.180 2010/01/12 08:33:19 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.181 2010/01/15 05:31:38 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -809,16 +809,23 @@ sd_buf_done(struct scsi_xfer *xs)
case XS_SHORTSENSE:
if (scsi_interpret_sense(xs) != ERESTART)
xs->retries = 0;
+ goto retry;
- /* FALLTHROUGH */
case XS_BUSY:
+ if (xs->retries) {
+ if (scsi_delay(xs, 1) != ERESTART)
+ xs->retries = 0;
+ }
+ goto retry;
+
case XS_TIMEOUT:
+retry:
if (xs->retries--) {
scsi_xs_exec(xs);
return;
}
-
/* FALLTHROUGH */
+
default:
bp->b_error = EIO;
bp->b_flags |= B_ERROR;